From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Service names on machines with bad service files Date: Mon, 19 Sep 2011 11:30:22 +0200 Organization: Programmerer Ingebrigtsen Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1316424863 4199 80.91.229.12 (19 Sep 2011 09:34:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Sep 2011 09:34:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 19 11:34:15 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R5aEv-0008Jv-Nm for ged-emacs-devel@m.gmane.org; Mon, 19 Sep 2011 11:34:13 +0200 Original-Received: from localhost ([::1]:35138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5aEv-00072n-3r for ged-emacs-devel@m.gmane.org; Mon, 19 Sep 2011 05:34:13 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5aEn-00072C-BK for emacs-devel@gnu.org; Mon, 19 Sep 2011 05:34:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5aEh-00038I-8Z for emacs-devel@gnu.org; Mon, 19 Sep 2011 05:34:05 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:38636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5aEg-00037o-W9 for emacs-devel@gnu.org; Mon, 19 Sep 2011 05:33:59 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R5aEf-0008C0-2X for emacs-devel@gnu.org; Mon, 19 Sep 2011 11:33:57 +0200 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Sep 2011 11:33:56 +0200 Original-Received: from larsi by cm-84.215.51.58.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Sep 2011 11:33:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.51.58.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUCAQExMTHX1teWlZdx cXIfHh5jY2QLCgpUVFT////9/f3ExMVERETv7++oqKmEhIWafzioAAABj0lEQVQ4jWOYiQMwEJaY 7JKWlo9NYtpB9nIJbBJzCg49rYDzViLpEAi24MGmY777YbMarBKGFW8CsUlMSQ8XxSoxozQ8sBGr c8PLA7HqmBbAzsCK1SgGBhwSoQHYJaacCJDBLiFeoxyKImH3+N3ufUbvpsgctfs4y9hYz+6x8Suw xG1dpdu7L+lOk/vT0jh39yUlJd3bu8ASuzRvz9SaNGla9tbTgnO1dmrO1NTVAktornw3U3O29rQj ruERk2Zqas7S1FwJltikdPem5t1F02TO9xyepH3z0aSbSppgiVlQV4U+2v0Yq3Mb7R5nYA0rcdEz 2ANR5gCOIGlrwC4x+YugXSmUvQpFx7fQb6HYdMwos/mNVWJatnlPKTaJKR0N4eexW+4Y8x+bxPxG u88mWO1gKPnSgV2CPRSr5dNCj6UIYpUQL5fHnkTz2hl9sPrDLjUAa3xMMXN1b1uJzaj80K8m2CSm hLqcMMMmMfnzOzsPbBLz//uk9GA1yk38hCg2idnGj9+9w+ZcNIBIiWgAAC6Eh309T5MoAAAAAElF TkSuQmCC Mail-Copies-To: never X-Now-Playing: Patrick Cowley & Jorge Socarras's _Catholic_: "I Never Want To Fall In Love" User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:cAvvn7bw/FKXRh7eAJj6sSPIJ28= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144091 Archived-At: A Windows user has a problem with opening a connection using port "imaps", which doesn't exist in that user's service file (or wherever Windows stashes these things). So I'm wondering whether there's any nice way to determine that that's the situation and work around it. (open-network-stream "hello" nil "gmail.com" "hello") => Debugger entered--Lisp error: (error "gmail.com/hello Servname not supported for ai_socktype") Possibilities are: 1) Don't use "imaps", but just say "993". This would work, and it's simple. But is it rude to use port numbers instead of service names? Are users supposed to be able to edit /etc/services and have "imaps" go off somewhere else entirely? 2) Somehow determine that the OS doesn't know what "imaps" is, and use "993" as a fallback. I have no idea whether that's easy to do. 3) Make `open-network-stream' "know" about these mappings (a variable), and if we get the right error message (i.e. the one above), we try again using that mapping. This would probably mean propagating RET meaningfully (somehow) from `make-network-process' here: ret = getaddrinfo (SSDATA (host), portstring, &hints, &res); if (ret) #ifdef HAVE_GAI_STRERROR error ("%s/%s %s", SSDATA (host), portstring, gai_strerror (ret)); #else error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret); #endif immediate_quit = 0; Thoughts? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/