]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/config.c
rework quarantine locking and so
[openldap] / servers / slapd / back-ldap / config.c
index 4088a982f21627b99bc5cf32cdd1a5a640cc1c19..14a44a51ed99627ab7e4d495fe752d3d52d3059a 100644 (file)
@@ -955,6 +955,7 @@ ldap_back_cf_gen( ConfigArgs *c )
                        }
 
                        slap_retry_info_destroy( &li->li_quarantine );
+                       ldap_pvt_thread_mutex_destroy( &li->li_quarantine_mutex );
                        li->li_isquarantined = 0;
                        break;
 
@@ -1654,10 +1655,13 @@ done_url:;
                        c->msg, sizeof( c->msg ) );
                if ( rc ) {
                        Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 );
+
+               } else {
+                       ldap_pvt_thread_mutex_init( &li->li_quarantine_mutex );
+                       /* give it a chance to retry if the pattern gets reset
+                        * via back-config */
+                       li->li_isquarantined = 0;
                }
-               /* give it a chance to retry if the pattern gets reset
-                * via back-config */
-               li->li_isquarantined = 0;
                break;
 
        case LDAP_BACK_CFG_REWRITE: