/* syncprov.c - syncrepl provider */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2004-2013 The OpenLDAP Foundation.
+ * Copyright 2004-2014 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "config.h"
#include "ldap_rq.h"
-#ifdef LDAP_DEVEL
#define CHECK_CSN 1
-#endif
/* A modify request on a particular entry */
typedef struct modinst {
fop.o_hdr = op->o_hdr;
fop.o_time = op->o_time;
fop.o_tincr = op->o_tincr;
+ fop.o_extra = op->o_extra;
cb.sc_response = findbase_cb;
cb.sc_private = fc;
fop.o_sync_mode = 0; /* turn off sync mode */
fop.o_managedsait = SLAP_CONTROL_CRITICAL;
fop.o_callback = &cb;
- LDAP_SLIST_INIT( &fop.o_extra );
fop.o_tag = LDAP_REQ_SEARCH;
fop.ors_scope = LDAP_SCOPE_BASE;
fop.ors_limit = NULL;
{
slap_callback *sc = op->o_callback;
op->o_callback = sc->sc_next;
- syncprov_drop_psearch( op->o_callback->sc_private, 0 );
+ syncprov_drop_psearch( sc->sc_private, 0 );
op->o_tmpfree( sc, op->o_tmpmemctx );
return 0;
}
phase otherwise (ITS#6555) */
op2.ors_filter = ss->s_op->ors_filter->f_and->f_next;
}
- ldap_pvt_thread_mutex_unlock( &ss->s_mutex );
rc = test_filter( &op2, e, op2.ors_filter );
+ ldap_pvt_thread_mutex_unlock( &ss->s_mutex );
}
Debug( LDAP_DEBUG_TRACE, "syncprov_matchops: sid %03x fscope %d rc %d\n",
#ifdef SLAP_CONFIG_DELETE
if ( !slapd_shutdown ) {
+ ldap_pvt_thread_mutex_lock( &si->si_ops_mutex );
for ( so=si->si_ops, sonext=so; so; so=sonext ) {
SlapReply rs = {REP_RESULT};
rs.sr_err = LDAP_UNAVAILABLE;
syncprov_drop_psearch( so, 0);
}
si->si_ops=NULL;
+ ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
}
overlay_unregister_control( be, LDAP_CONTROL_SYNC );
#endif /* SLAP_CONFIG_DELETE */