]> git.sur5r.net Git - openldap/commitdiff
ITS#5726: Revert 1.392, the runqueue must always be inspected.
authorRein Tollevik <rein@openldap.org>
Sun, 5 Oct 2008 22:35:44 +0000 (22:35 +0000)
committerRein Tollevik <rein@openldap.org>
Sun, 5 Oct 2008 22:35:44 +0000 (22:35 +0000)
servers/slapd/syncrepl.c

index 15612e6fcad2f5fdb842ac04650c9e62662f2756..128f30295609fd26765a37120de6ebb24a86cb8d 100644 (file)
@@ -1204,7 +1204,7 @@ do_syncrepl(
        OperationBuffer opbuf;
        Operation *op;
        int rc = LDAP_SUCCESS;
-       int dostop = 0, do_setup = 0;
+       int dostop = 0;
        ber_socket_t s;
        int i, defer = 1, fail = 0;
        Backend *be;
@@ -1319,9 +1319,8 @@ reload:
                                if ( rc == LDAP_SUCCESS ) {
                                        if ( si->si_conn ) {
                                                connection_client_enable( si->si_conn );
-                                               goto success;
                                        } else {
-                                               do_setup = 1;
+                                               si->si_conn = connection_client_setup( s, do_syncrepl, arg );
                                        } 
                                } else if ( si->si_conn ) {
                                        dostop = 1;
@@ -1388,11 +1387,6 @@ reload:
        }
 
        ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex );
-
-       if ( do_setup )
-               si->si_conn = connection_client_setup( s, do_syncrepl, arg );
-
-success:
        ldap_pvt_thread_mutex_unlock( &si->si_mutex );
 
        if ( rc ) {