]> git.sur5r.net Git - openldap/commitdiff
Init & destroy so.s_mutex around syncprov_findbase() call in syncprov_op_search
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 2 Apr 2006 23:49:57 +0000 (23:49 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 2 Apr 2006 23:49:57 +0000 (23:49 +0000)
servers/slapd/overlays/syncprov.c

index 916b2a2ae31167a8aa3ad18b43a88a4b9502e2f5..2278ad34ebd284b1e4cce696d0aea16b80313fd9 100644 (file)
@@ -1902,10 +1902,12 @@ syncprov_op_search( Operation *op, SlapReply *rs )
                /* syncprov_findbase expects to be called as a callback... */
                sc.sc_private = &opc;
                opc.son = on;
+               ldap_pvt_thread_mutex_init( &so.s_mutex );
                cb = op->o_callback;
                op->o_callback = &sc;
                rs->sr_err = syncprov_findbase( op, &fc );
                op->o_callback = cb;
+               ldap_pvt_thread_mutex_destroy( &so.s_mutex );
 
                if ( rs->sr_err != LDAP_SUCCESS ) {
                        send_ldap_result( op, rs );