]> git.sur5r.net Git - openldap/commitdiff
Import ITS#4401 fix from HEAD
authorHoward Chu <hyc@openldap.org>
Thu, 16 Feb 2006 06:48:14 +0000 (06:48 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 16 Feb 2006 06:48:14 +0000 (06:48 +0000)
CHANGES
servers/slapd/syncrepl.c

diff --git a/CHANGES b/CHANGES
index ba3071839190b1ed2f9b0b480ba632ff713ed733..a27bc8107c786497256efc9f420cbc362933634b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,7 @@ OpenLDAP 2.3.20 Engineering
        Fixed slapd context CSN not updating issue (ITS#4384)
        Fixed slapd non-read/write epoll event handling (ITS#4395)
        Fixed slapd syncrepl de-normalize UUID issue
+       Fixed slapd syncrepl dynamic reconfig issue (ITS#4401)
        Added slapd syncrepl log messages (ITS#4369)
        Added slapd permissive modify/increment support
        Fixed slapd connectionless LDAP support
index 34960346b2da48621720a073c78a7bcf90c324d3..ab6fd7efdbcfb171d7dc2216359792098dc43dcf 100644 (file)
@@ -2582,6 +2582,16 @@ avl_ber_bvfree( void *v_bv )
 void
 syncinfo_free( syncinfo_t *sie )
 {
+       if ( sie->si_ld ) {
+               if ( sie->si_conn_setup ) {
+                       ber_socket_t s;
+                       ldap_get_option( sie->si_ld, LDAP_OPT_DESC, &s );
+                       connection_client_stop( s );
+                       sie->si_conn_setup = 0;
+               }
+               ldap_unbind_ext( sie->si_ld, NULL, NULL );
+       }
+
        ldap_pvt_thread_mutex_destroy( &sie->si_mutex );
 
        bindconf_free( &sie->si_bindconf );
@@ -2637,9 +2647,6 @@ syncinfo_free( syncinfo_t *sie )
        if ( sie->si_presentlist ) {
            avl_free( sie->si_presentlist, avl_ber_bvfree );
        }
-       if ( sie->si_ld ) {
-               ldap_unbind_ext( sie->si_ld, NULL, NULL );
-       }
        while ( !LDAP_LIST_EMPTY( &sie->si_nonpresentlist )) {
                struct nonpresent_entry* npe;
                npe = LDAP_LIST_FIRST( &sie->si_nonpresentlist );