Init & destroy so.s_mutex around syncprov_findbase() call in syncprov_op_search

This commit is contained in:
Hallvard Furuseth 2006-04-02 23:49:57 +00:00
parent b2f79aa42e
commit 19a0d82937

View 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 = ≻
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 );