From: Howard Chu Date: Tue, 10 Jan 2006 18:32:09 +0000 (+0000) Subject: ITS#4319 fix check for need_shutdown/slap_shutdown() X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~359 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a9844efa7011f566607b1a8ae4e183c24e1a322c;p=openldap ITS#4319 fix check for need_shutdown/slap_shutdown() --- diff --git a/servers/slapd/slapcommon.c b/servers/slapd/slapcommon.c index a1d8c0d9d8..9f99363dc8 100644 --- a/servers/slapd/slapcommon.c +++ b/servers/slapd/slapcommon.c @@ -627,22 +627,24 @@ startup:; } /* slapdn doesn't specify a backend to startup */ - if ( !dryrun && tool != SLAPDN && slap_startup( be ) ) { + if ( !dryrun && tool != SLAPDN ) { need_shutdown = 1; - switch ( tool ) { - case SLAPTEST: - fprintf( stderr, "slap_startup failed " - "(test would succeed using " - "the -u switch)\n" ); - break; + if ( slap_startup( be ) ) { + switch ( tool ) { + case SLAPTEST: + fprintf( stderr, "slap_startup failed " + "(test would succeed using " + "the -u switch)\n" ); + break; + + default: + fprintf( stderr, "slap_startup failed\n" ); + break; + } - default: - fprintf( stderr, "slap_startup failed\n" ); - break; + exit( EXIT_FAILURE ); } - - exit( EXIT_FAILURE ); } }