Skip to content
Snippets Groups Projects
Commit a5ac8f57 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Complain if setsockopt TCP_NODELAY fails

parent 7ef67830
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment