/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
switch ( slapMode & SLAP_MODE ) {
case SLAP_SERVER_MODE:
+ root_dse_init();
/* FALLTHRU */
case SLAP_TOOL_MODE:
ber_bvarray_free( default_referral );
}
+ /* clear out any thread-keys for the main thread */
+ ldap_pvt_thread_pool_context_reset( ldap_pvt_thread_pool_context());
+
rc = backend_destroy();
slap_sasl_destroy();
+ /* rootdse destroy goes before entry_destroy()
+ * because it may use entry_free() */
+ root_dse_destroy();
entry_destroy();
switch ( slapMode & SLAP_MODE ) {
case SLAP_SERVER_MODE:
+
case SLAP_TOOL_MODE:
ldap_pvt_thread_mutex_destroy( &slap_counters.sc_sent_mutex );