]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-meta/unbind.c
Fix typo
[openldap] / servers / slapd / back-meta / unbind.c
index 71086e58a4624371b1a533546d47597dc28d5ed1..e4f381e988d376874aac7187314666066e45a1b0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1998-2001 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  *
  * Copyright 2001, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>
@@ -84,9 +84,14 @@ meta_back_conn_destroy(
        struct metainfo *li = ( struct metainfo * )be->be_private;
        struct metaconn *lc, lc_curr;
 
+#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 */
        
        lc_curr.conn = conn;
        
@@ -98,22 +103,26 @@ meta_back_conn_destroy(
        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 */
                
                /*
                 * Cleanup rewrite session
                 */
                for ( i = 0; i < li->ntargets; ++i ) {
-                       if ( lc->conns[ i ]->ld == NULL ) {
-                               free( lc->conns[ i ] );
+                       if ( lc->conns[ i ].ld == NULL ) {
                                continue;
                        }
 
                        rewrite_session_delete( li->targets[ i ]->rwinfo, conn );
-                       meta_clear_one_candidate( lc->conns[ i ], 1 );
-                       free( lc->conns[ i ] );
+                       meta_clear_one_candidate( &lc->conns[ i ], 1 );
                }
 
                free( lc->conns );