Add copyright notice.

This commit is contained in:
Kurt Zeilenga 1999-08-04 23:59:53 +00:00
parent 9ea7a42b99
commit c73106936b
2 changed files with 20 additions and 3 deletions

View File

@ -1,3 +1,7 @@
#
# Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
#
all: setup.txt

View File

@ -603,18 +603,31 @@ set_socket(
exit( 1 );
}
#ifdef SO_REUSEADDR
/* set option so clients can't keep us from coming back up */
i = 1;
i = 1;
if ( setsockopt( s, SOL_SOCKET, SO_REUSEADDR, (void *) &i, sizeof(i) )
< 0 ) {
< 0 )
{
perror( "setsockopt" );
exit( 1 );
}
#endif
#ifdef SO_KEEPALIVE
/* enable keep alives */
i = 1;
if ( setsockopt( s, SOL_SOCKET, SO_KEEPALIVE, (void *) &i, sizeof(i) )
< 0 )
{
perror( "setsockopt" );
exit( 1 );
}
#endif
/* bind to a name */
(void)memset( (void *)&addr, '\0', sizeof( addr ));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons( port );
if ( bind( s, (struct sockaddr *) &addr, sizeof(addr) ) ) {
perror( "bind" );