]> git.sur5r.net Git - openldap/commitdiff
cleanup prev commit
authorHoward Chu <hyc@openldap.org>
Tue, 17 Mar 2009 01:00:55 +0000 (01:00 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 17 Mar 2009 01:00:55 +0000 (01:00 +0000)
servers/slapd/syncrepl.c

index 73a56a3ccff2a5a8d6ccd49d089472a24fc43657..2033100e37c26f6ecc4a162a8a9be126d6b34e08 100644 (file)
@@ -4597,15 +4597,15 @@ syncrepl_config( ConfigArgs *c )
                                         * happen when running on the cn=config DB.
                                         */
                                        if ( si->si_re ) {
-                                               Connection *c;
-                                               if ( ldap_pvt_thread_mutex_trylock( &si->si_mutex ))
+                                               if ( ldap_pvt_thread_mutex_trylock( &si->si_mutex )) {
                                                        isrunning = 1;
-                                               c = si->si_conn;
-                                               si->si_conn = NULL;
-                                               if ( c )
-                                                       connection_client_stop( c );
-                                               if ( !isrunning )
+                                               } else {
                                                        ldap_pvt_thread_mutex_unlock( &si->si_mutex );
+                                               }
+                                               if ( si->si_conn ) {
+                                                       connection_client_stop( si->si_conn );
+                                                       si->si_conn = NULL;
+                                               }
                                        }
                                        if ( si->si_re && isrunning ) {
                                                si->si_ctype = 0;