From: Howard Chu Date: Sat, 27 Nov 2004 08:55:04 +0000 (+0000) Subject: Fix modify serialization X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~205 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1bb93ae084476ccceb7b6c0c14454dbd91ddb8dd;p=openldap Fix modify serialization --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index f6f414aa1c..d25b22aca6 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -970,6 +970,7 @@ syncprov_op_cleanup( Operation *op, SlapReply *rs ) mtdummy.mt_op = op; ldap_pvt_thread_mutex_lock( &si->si_mods_mutex ); mt = avl_find( si->si_mods, &mtdummy, sp_avl_cmp ); + ldap_pvt_thread_mutex_unlock( &si->si_mods_mutex ); if ( mt ) { modinst *mi = mt->mt_mods; @@ -980,13 +981,14 @@ syncprov_op_cleanup( Operation *op, SlapReply *rs ) mt->mt_op = mt->mt_mods->mi_op; ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); } else { + ldap_pvt_thread_mutex_lock( &si->si_mods_mutex ); avl_delete( &si->si_mods, mt, sp_avl_cmp ); + ldap_pvt_thread_mutex_unlock( &si->si_mods_mutex ); ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); ldap_pvt_thread_mutex_destroy( &mt->mt_mutex ); ch_free( mt ); } } - ldap_pvt_thread_mutex_unlock( &si->si_mods_mutex ); op->o_callback = cb->sc_next; op->o_tmpfree(cb, op->o_tmpmemctx); }