From a9844efa7011f566607b1a8ae4e183c24e1a322c Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 10 Jan 2006 18:32:09 +0000 Subject: [PATCH] ITS#4319 fix check for need_shutdown/slap_shutdown() --- servers/slapd/slapcommon.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) 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 ); } } -- 2.39.5