From a5ac8f57f8c639863f9f32852ad35929b4e379c5 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 19 Oct 1999 19:07:24 +0000 Subject: [PATCH] Complain if setsockopt TCP_NODELAY fails --- libraries/libldap/os-ip.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; -- 2.39.5