/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2003 The OpenLDAP Foundation.
+ * Copyright 1999-2005 The OpenLDAP Foundation.
* Portions Copyright 2001-2003 Pierangelo Masarati.
* Portions Copyright 1999-2003 Howard Chu.
* All rights reserved.
)
{
struct metainfo *li = ( struct metainfo * )be->be_private;
- struct metaconn *lc, lc_curr;
+ struct metaconn *lc,
+ lc_curr = { 0 };
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_META, ENTRY,
- "meta_back_conn_destroy: fetching conn %ld\n", conn->c_connid, 0, 0 );
-#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
- "=>meta_back_conn_destroy: fetching conn %ld\n%s%s",
- conn->c_connid, "", "" );
-#endif /* !NEW_LOGGING */
+ "=>meta_back_conn_destroy: fetching conn %ld\n",
+ conn->c_connid, 0, 0 );
- lc_curr.conn = conn;
+ lc_curr.mc_conn = conn;
ldap_pvt_thread_mutex_lock( &li->conn_mutex );
lc = avl_delete( &li->conntree, ( caddr_t )&lc_curr,
if ( lc ) {
int i;
-#ifdef NEW_LOGGING
- LDAP_LOG( BACK_META, INFO,
- "meta_back_conn_destroy: destroying conn %ld\n",
- lc->conn->c_connid, 0, 0 );
-#else /* !NEW_LOGGING */
Debug( LDAP_DEBUG_TRACE,
- "=>meta_back_conn_destroy: destroying conn %ld\n%s%s",
- lc->conn->c_connid, "", "" );
-#endif /* !NEW_LOGGING */
+ "=>meta_back_conn_destroy: destroying conn %ld\n",
+ lc->mc_conn->c_connid, 0, 0 );
/*
* Cleanup rewrite session
*/
for ( i = 0; i < li->ntargets; ++i ) {
- if ( lc->conns[ i ].ld == NULL ) {
+ if ( lc->mc_conns[ i ].msc_ld == NULL ) {
continue;
}
- rewrite_session_delete( li->targets[ i ]->rwmap.rwm_rw, conn );
- meta_clear_one_candidate( &lc->conns[ i ], 1 );
+ rewrite_session_delete( li->targets[ i ]->mt_rwmap.rwm_rw, conn );
+ meta_clear_one_candidate( &lc->mc_conns[ i ], 1 );
}
- free( lc->conns );
+ free( lc->mc_conns );
free( lc );
}