Mercurial > emacs
diff src/process.c @ 108754:728449765ab0
* process.c (Fmake_network_process): Set :host to nil if it's not used.
Suggested by Masatake YAMATO <yamato@redhat.com>.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Mon, 24 May 2010 16:46:41 -0400 |
| parents | 06c34f190db1 |
| children | d418516def73 |
line wrap: on
line diff
--- a/src/process.c Mon May 24 13:35:41 2010 +0200 +++ b/src/process.c Mon May 24 16:46:41 2010 -0400 @@ -3347,11 +3347,25 @@ /* :service SERVICE -- string, integer (port number), or t (random port). */ service = Fplist_get (contact, QCservice); + /* :host HOST -- hostname, ip address, or 'local for localhost. */ + host = Fplist_get (contact, QChost); + if (!NILP (host)) + { + if (EQ (host, Qlocal)) + host = build_string ("localhost"); + CHECK_STRING (host); + } + #ifdef HAVE_LOCAL_SOCKETS if (family == AF_LOCAL) { - /* Host is not used. */ - host = Qnil; + if (!NILP (host)) + { + message (":family local ignores the :host \"%s\" property", + SDATA (host)); + contact = Fplist_put (contact, QChost, Qnil); + host = Qnil; + } CHECK_STRING (service); bzero (&address_un, sizeof address_un); address_un.sun_family = AF_LOCAL; @@ -3362,15 +3376,6 @@ } #endif - /* :host HOST -- hostname, ip address, or 'local for localhost. */ - host = Fplist_get (contact, QChost); - if (!NILP (host)) - { - if (EQ (host, Qlocal)) - host = build_string ("localhost"); - CHECK_STRING (host); - } - /* Slow down polling to every ten seconds. Some kernels have a bug which causes retrying connect to fail after a connect. Polling can interfere with gethostbyname too. */
