]> git.sur5r.net Git - openldap/commitdiff
Complain if setsockopt TCP_NODELAY fails
authorKurt Zeilenga <kurt@openldap.org>
Tue, 19 Oct 1999 19:07:24 +0000 (19:07 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 19 Oct 1999 19:07:24 +0000 (19:07 +0000)
libraries/libldap/os-ip.c

index 2eb1c02eff228ad67b32453ea7679677b77770d7..0ed3c90046549b4d52f804dd3e4a2c8b54962cc7 100644 (file)
@@ -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;