From: Kurt Zeilenga Date: Tue, 19 Oct 1999 19:07:24 +0000 (+0000) Subject: Complain if setsockopt TCP_NODELAY fails X-Git-Tag: UCDATA_2_4~338 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a5ac8f57f8c639863f9f32852ad35929b4e379c5;p=openldap Complain if setsockopt TCP_NODELAY fails --- diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 2eb1c02eff..0ed3c90046 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -117,8 +117,13 @@ ldap_pvt_prepare_socket(LDAP *ld, int fd) #ifdef TCP_NODELAY { int dummy = 1; - if ( setsockopt( fd, IPPROTO_TCP, TCP_NODELAY, (char*) &dummy, sizeof(dummy) ) == -1 ) - return -1; + if ( setsockopt( fd, IPPROTO_TCP, TCP_NODELAY, + (char*) &dummy, sizeof(dummy) ) == AC_SOCKET_ERROR ) + { + osip_debug(ld, "ldap_prepare_socket: " + "setsockopt(%d, TCP_NODELAY) failed (ignored).\n", + fd, 0, 0); + } } #endif return 0;