mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Add copyright notice.
This commit is contained in:
parent
9ea7a42b99
commit
c73106936b
@ -1,3 +1,7 @@
|
||||
#
|
||||
# Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
|
||||
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
#
|
||||
|
||||
all: setup.txt
|
||||
|
||||
|
@ -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" );
|
||||
|
Loading…
Reference in New Issue
Block a user