From: Quanah Gibson-Mount Date: Wed, 3 Sep 2008 00:29:02 +0000 (+0000) Subject: ITS#5606 X-Git-Tag: OPENLDAP_REL_ENG_2_4_12~116 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c7a2fe236aad1c26b7498e6a6a20ecfecba243fd;p=openldap ITS#5606 --- diff --git a/CHANGES b/CHANGES index d9e3f0a426..206bfef18a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ OpenLDAP 2.4 Change Log OpenLDAP 2.4.12 Engineering + Fixed slapd socket closing on Windows (ITS#5606) Fixed slapd-meta quarantine behavior (ITS#5592) Fixed slapo-constraint string termination (ITS#5609) Fixed slapo-rwm callback cleanup (ITS#5601) diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 45bd7d3fe8..92a2b03095 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -79,7 +79,11 @@ Listener **slap_listeners = NULL; #define SLAPD_LISTEN_BACKLOG 1024 #endif /* ! SLAPD_LISTEN_BACKLOG */ -static ber_socket_t wake_sds[2]; +static ber_socket_t wake_sds[2] +#ifdef HAVE_WINSOCK + = { INVALID_SOCKET, INVALID_SOCKET } +#endif /* HAVE_WINSOCK */ + ; static int emfile; static volatile int waking; @@ -1641,8 +1645,14 @@ int slapd_daemon_destroy( void ) { connections_destroy(); - tcp_close( SLAP_FD2SOCK(wake_sds[1]) ); - tcp_close( SLAP_FD2SOCK(wake_sds[0]) ); +#ifdef HAVE_WINSOCK + if ( wake_sds[1] != INVALID_SOCKET ) +#endif /* HAVE_WINSOCK */ + tcp_close( SLAP_FD2SOCK(wake_sds[1]) ); +#ifdef HAVE_WINSOCK + if ( wake_sds[0] != INVALID_SOCKET ) +#endif /* HAVE_WINSOCK */ + tcp_close( SLAP_FD2SOCK(wake_sds[0]) ); sockdestroy(); #ifdef HAVE_SLP