comparison src/process.c @ 108760:f528b6459bdd

merge trunk
author Kenichi Handa <handa@etlken>
date Tue, 25 May 2010 09:35:50 +0900
parents 728449765ab0
children d418516def73
comparison
equal deleted inserted replaced
108759:0bb727f1d547 108760:f528b6459bdd
3345 ai.ai_family = family; 3345 ai.ai_family = family;
3346 3346
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;
3358 strncpy (address_un.sun_path, SDATA (service), sizeof address_un.sun_path); 3372 strncpy (address_un.sun_path, SDATA (service), sizeof address_un.sun_path);
3359 ai.ai_addr = (struct sockaddr *) &address_un; 3373 ai.ai_addr = (struct sockaddr *) &address_un;
3360 ai.ai_addrlen = sizeof address_un; 3374 ai.ai_addrlen = sizeof address_un;
3361 goto open_socket; 3375 goto open_socket;
3362 } 3376 }
3363 #endif 3377 #endif
3364
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 3378
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. */
3377 #ifdef POLL_FOR_INPUT 3382 #ifdef POLL_FOR_INPUT