Fixed slapd contextCSN pending list (ITS#5709)
Fixed slapd control criticality (ITS#5785)
Added slapd dn.this search limits (ITS#5734)
+ Fixed slapd error status on shutdown (ITS#5745)
Fixed slapd nameUIDPretty bitstring parsing (ITS#5750)
Fixed slapd overlay/database open with real structure (ITS#5724)
Fixed slapd parsing of read entry control (ITS#5741)
ber_bvarray_free( bdb->bi_db_config );
bdb->bi_db_config = NULL;
+ if( bdb->bi_dbenv ) {
+ /* Free cache locker if we enabled locking.
+ * TXNs must all be closed before DBs...
+ */
+ if ( !( slapMode & SLAP_TOOL_QUICK ) && bdb->bi_cache.c_txn ) {
+ TXN_ABORT( bdb->bi_cache.c_txn );
+ bdb->bi_cache.c_txn = NULL;
+ }
+ bdb_reader_flush( bdb->bi_dbenv );
+ }
+
while( bdb->bi_databases && bdb->bi_ndatabases-- ) {
db = bdb->bi_databases[bdb->bi_ndatabases];
rc = db->bdi_db->close( db->bdi_db, 0 );
/* close db environment */
if( bdb->bi_dbenv ) {
- /* Free cache locker if we enabled locking */
- if ( !( slapMode & SLAP_TOOL_QUICK ) && bdb->bi_cache.c_txn ) {
- TXN_ABORT( bdb->bi_cache.c_txn );
- bdb->bi_cache.c_txn = NULL;
- }
- bdb_reader_flush( bdb->bi_dbenv );
-
/* force a checkpoint, but not if we were ReadOnly,
* and not in Quick mode since there are no transactions there.
*/
}
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;
+/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 2004-2008 The OpenLDAP Foundation.
}
}
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return rc;
}
}
}
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return rc;
}
+/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 2004-2008 The OpenLDAP Foundation.
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_ */
+/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 2004-2008 The OpenLDAP Foundation.
}
}
- 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 );
}
+/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 2004-2008 The OpenLDAP Foundation.
fprintf( stderr, "config file testing succeeded\n");
}
- slap_tool_destroy();
+ if ( slap_tool_destroy())
+ rc = EXIT_FAILURE;
return rc;
}