fix ITS#3254

This commit is contained in:
Pierangelo Masarati 2004-07-25 22:57:52 +00:00
parent 9c0ed9b6bd
commit 392366818e

View File

@ -39,6 +39,23 @@ monitor_subsys_listener_init(
assert( be != NULL );
if ( ( l = slapd_get_listeners() ) == NULL ) {
if ( slapMode & SLAP_TOOL_MODE ) {
return 0;
}
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_listener_init: "
"unable to get listeners\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_listener_init: "
"unable to get listeners\n", 0, 0, 0 );
#endif
return( -1 );
}
mi = ( struct monitorinfo * )be->be_private;
if ( monitor_cache_get( mi,
@ -59,19 +76,6 @@ monitor_subsys_listener_init(
return( -1 );
}
if ( ( l = slapd_get_listeners() ) == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_listener_init: "
"unable to get listeners\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_listener_init: "
"unable to get listeners\n", 0, 0, 0 );
#endif
return( -1 );
}
e_tmp = NULL;
for ( i = 0; l[i]; i++ );
for ( ; i--; ) {