/* seqmod.c - sequenced modifies */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2004 The OpenLDAP Foundation.
+ * Copyright 2004-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
{
slap_callback *sc = op->o_callback;
seqmod_info *sm = sc->sc_private;
- modtarget *mt;
+ modtarget *mt, mtdummy;
Avlnode *av;
+ mtdummy.mt_op = op;
/* This op is done, remove it */
ldap_pvt_thread_mutex_lock( &sm->sm_mutex );
- av = avl_find( sm->sm_mods, mt, sm_avl_cmp );
- assert(av);
+ av = avl_find2( sm->sm_mods, &mtdummy, sm_avl_cmp );
+ assert(av != NULL);
mt = av->avl_data;
* near-simultaneous mods of the same entry
*/
ldap_pvt_thread_mutex_lock( &sm->sm_mutex );
- av = avl_find( sm->sm_mods, mt, sm_avl_cmp );
+ av = avl_find2( sm->sm_mods, mt, sm_avl_cmp );
if ( av ) {
modtarget *mtp = av->avl_data;
mtp->mt_tail->mt_next = mt;
static slap_overinst seqmod;
int
-seqmod_init()
+seqmod_initialize()
{
seqmod.on_bi.bi_type = "seqmod";
seqmod.on_bi.bi_db_open = seqmod_db_open;
int
init_module( int argc, char *argv[] )
{
- return seqmod_init();
+ return seqmod_initialize();
}
#endif /* SLAPD_OVER_SEQMOD == SLAPD_MOD_DYNAMIC */