mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 08:39:37 -05:00
ITS#5745 report errors in shutdown processing
This commit is contained in:
parent
9d5de25b5b
commit
4e22081e02
10 changed files with 26 additions and 13 deletions
|
|
@ -349,11 +349,13 @@ int backend_shutdown( Backend *be )
|
|||
}
|
||||
|
||||
if ( be->bd_info->bi_db_close ) {
|
||||
be->bd_info->bi_db_close( be, NULL );
|
||||
rc = be->bd_info->bi_db_close( be, NULL );
|
||||
if ( rc ) return rc;
|
||||
}
|
||||
|
||||
if( be->bd_info->bi_close ) {
|
||||
be->bd_info->bi_close( be->bd_info );
|
||||
rc = be->bd_info->bi_close( be->bd_info );
|
||||
if ( rc ) return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -399,7 +399,8 @@ destroy:;
|
|||
}
|
||||
}
|
||||
|
||||
slap_tool_destroy();
|
||||
if ( slap_tool_destroy())
|
||||
rc = EXIT_FAILURE;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -447,7 +447,8 @@ slapadd( int argc, char **argv )
|
|||
}
|
||||
}
|
||||
|
||||
slap_tool_destroy();
|
||||
if ( slap_tool_destroy())
|
||||
rc = EXIT_FAILURE;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,8 @@ destroy:;
|
|||
if ( !BER_BVISNULL( &authzID ) ) {
|
||||
op->o_tmpfree( authzID.bv_val, op->o_tmpmemctx );
|
||||
}
|
||||
slap_tool_destroy();
|
||||
if ( slap_tool_destroy())
|
||||
rc = EXIT_FAILURE;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ slapcat( int argc, char **argv )
|
|||
|
||||
be->be_entry_close( be );
|
||||
|
||||
slap_tool_destroy();
|
||||
if ( slap_tool_destroy())
|
||||
rc = EXIT_FAILURE;
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -740,13 +740,16 @@ startup:;
|
|||
}
|
||||
}
|
||||
|
||||
void slap_tool_destroy( void )
|
||||
int slap_tool_destroy( void )
|
||||
{
|
||||
int rc = 0;
|
||||
if ( !dryrun ) {
|
||||
if ( need_shutdown ) {
|
||||
slap_shutdown( be );
|
||||
if ( slap_shutdown( be ))
|
||||
rc = EXIT_FAILURE;
|
||||
}
|
||||
slap_destroy();
|
||||
if ( slap_destroy())
|
||||
rc = EXIT_FAILURE;
|
||||
}
|
||||
#ifdef SLAPD_MODULES
|
||||
if ( slapMode == SLAP_SERVER_MODE ) {
|
||||
|
|
@ -772,4 +775,5 @@ void slap_tool_destroy( void )
|
|||
if ( ldiffp && ldiffp != &dummy ) {
|
||||
ldif_close( ldiffp );
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,6 +101,6 @@ void slap_tool_init LDAP_P((
|
|||
int tool,
|
||||
int argc, char **argv ));
|
||||
|
||||
void slap_tool_destroy LDAP_P((void));
|
||||
int slap_tool_destroy LDAP_P((void));
|
||||
|
||||
#endif /* SLAPCOMMON_H_ */
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ slapdn( int argc, char **argv )
|
|||
}
|
||||
}
|
||||
|
||||
slap_tool_destroy();
|
||||
if ( slap_tool_destroy())
|
||||
rc = EXIT_FAILURE;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ slapindex( int argc, char **argv )
|
|||
|
||||
(void) be->be_entry_close( be );
|
||||
|
||||
slap_tool_destroy();
|
||||
if ( slap_tool_destroy())
|
||||
rc = EXIT_FAILURE;
|
||||
return( rc );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,8 @@ slaptest( int argc, char **argv )
|
|||
fprintf( stderr, "config file testing succeeded\n");
|
||||
}
|
||||
|
||||
slap_tool_destroy();
|
||||
if ( slap_tool_destroy())
|
||||
rc = EXIT_FAILURE;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue