From: Howard Chu Date: Wed, 9 Oct 2002 18:57:50 +0000 (+0000) Subject: Fix ITS#2132, give up if listener fails to open X-Git-Tag: NO_SLAP_OP_BLOCKS~908 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b9bd44b04736539020f88bd6df142e6b52e7b173;p=openldap Fix ITS#2132, give up if listener fails to open --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 94de3b729b..f8fc27aef4 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -581,6 +581,8 @@ static int slap_open_listener( return rc; } + l.sl_url = NULL; + #ifndef HAVE_TLS if( ldap_pvt_url_scheme2tls( lud->lud_scheme ) ) { #ifdef NEW_LOGGING @@ -859,10 +861,21 @@ static int slap_open_listener( slap_free_listener_addresses(psal); + if ( l.sl_url == NULL ) + { +#ifdef NEW_LOGGING + LDAP_LOG( CONNECTION, RESULTS, + "slap_open_listener: failed on %s\n", url, 0, 0 ); +#else + Debug( LDAP_DEBUG_TRACE, + "slap_open_listener: failed on %s\n", url, 0, 0 ); +#endif + return -1; + } #ifdef NEW_LOGGING LDAP_LOG( CONNECTION, RESULTS, - "slap_open_listener: daemon initialzed %s\n", l.sl_url, 0, 0 ); + "slap_open_listener: daemon initialized %s\n", l.sl_url, 0, 0 ); #else Debug( LDAP_DEBUG_TRACE, "daemon: initialized %s\n", l.sl_url, 0, 0 );