aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorStefan Monnier2010-05-24 16:46:41 -0400
committerStefan Monnier2010-05-24 16:46:41 -0400
commit66a9f7f460fa1808e1e897fba35c7aba3d4b2e1d (patch)
treea3af16a40d21177a2a3519758b3f5db0c8b82332 /src/process.c
parentc17e9c60bea331e361600d9acb9f101e56df2eef (diff)
downloademacs-66a9f7f460fa1808e1e897fba35c7aba3d4b2e1d.tar.gz
emacs-66a9f7f460fa1808e1e897fba35c7aba3d4b2e1d.zip
* process.c (Fmake_network_process): Set :host to nil if it's not used.
Suggested by Masatake YAMATO <yamato@redhat.com>.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/process.c b/src/process.c
index a09ac297a2d..acc13ea199b 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3347,11 +3347,25 @@ usage: (make-network-process &rest ARGS) */)
3347 /* :service SERVICE -- string, integer (port number), or t (random port). */ 3347 /* :service SERVICE -- string, integer (port number), or t (random port). */
3348 service = Fplist_get (contact, QCservice); 3348 service = Fplist_get (contact, QCservice);
3349 3349
3350 /* :host HOST -- hostname, ip address, or 'local for localhost. */
3351 host = Fplist_get (contact, QChost);
3352 if (!NILP (host))
3353 {
3354 if (EQ (host, Qlocal))
3355 host = build_string ("localhost");
3356 CHECK_STRING (host);
3357 }
3358
3350#ifdef HAVE_LOCAL_SOCKETS 3359#ifdef HAVE_LOCAL_SOCKETS
3351 if (family == AF_LOCAL) 3360 if (family == AF_LOCAL)
3352 { 3361 {
3353 /* Host is not used. */ 3362 if (!NILP (host))
3354 host = Qnil; 3363 {
3364 message (":family local ignores the :host \"%s\" property",
3365 SDATA (host));
3366 contact = Fplist_put (contact, QChost, Qnil);
3367 host = Qnil;
3368 }
3355 CHECK_STRING (service); 3369 CHECK_STRING (service);
3356 bzero (&address_un, sizeof address_un); 3370 bzero (&address_un, sizeof address_un);
3357 address_un.sun_family = AF_LOCAL; 3371 address_un.sun_family = AF_LOCAL;
@@ -3362,15 +3376,6 @@ usage: (make-network-process &rest ARGS) */)
3362 } 3376 }
3363#endif 3377#endif
3364 3378
3365 /* :host HOST -- hostname, ip address, or 'local for localhost. */
3366 host = Fplist_get (contact, QChost);
3367 if (!NILP (host))
3368 {
3369 if (EQ (host, Qlocal))
3370 host = build_string ("localhost");
3371 CHECK_STRING (host);
3372 }
3373
3374 /* Slow down polling to every ten seconds. 3379 /* Slow down polling to every ten seconds.
3375 Some kernels have a bug which causes retrying connect to fail 3380 Some kernels have a bug which causes retrying connect to fail
3376 after a connect. Polling can interfere with gethostbyname too. */ 3381 after a connect. Polling can interfere with gethostbyname too. */