/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
* Portions Copyright 1998-2003 Kurt D. Zeilenga.
* Portions Copyright 2003 IBM Corporation.
* All rights reserved.
}
if ( use_glue ) {
- rc = glue_sub_attach();
+ rc = glue_sub_attach( 0 );
if ( rc != 0 ) {
fprintf( stderr,
}
}
-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;
}