}
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;
}
}
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return rc;
}
}
}
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return rc;
}
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;
}
be->be_entry_close( be );
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return rc;
}
}
}
-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 ) {
if ( ldiffp && ldiffp != &dummy ) {
ldif_close( ldiffp );
}
+ return rc;
}
int tool,
int argc, char **argv ));
-void slap_tool_destroy LDAP_P((void));
+int slap_tool_destroy LDAP_P((void));
#endif /* SLAPCOMMON_H_ */
}
}
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return rc;
}
(void) be->be_entry_close( be );
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return( rc );
}
fprintf( stderr, "config file testing succeeded\n");
}
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return rc;
}