static int addpartial_add( Operation *op, SlapReply *rs)
{
Operation nop = *op;
- SlapReply nrs = { REP_RESULT };
Entry *toAdd = NULL;
Entry *found = NULL;
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
Debug(LDAP_DEBUG_TRACE, "%s: mods to do...\n",
addpartial.on_bi.bi_type, 0, 0);
- memset(&nrs, 0, sizeof(nrs));
- nrs.sr_type = REP_RESULT;
- nrs.sr_err = LDAP_SUCCESS;
- nrs.sr_entry = NULL;
- nrs.sr_text = NULL;
-
nop.o_tag = LDAP_REQ_MODIFY;
nop.orm_modlist = mods;
nop.orm_no_opattrs = 0;
if(nop.o_bd->be_modify)
{
+ SlapReply nrs = { REP_RESULT };
rc = (nop.o_bd->be_modify)(&nop, &nrs);
}
o.o_bd->bd_info = (BackendInfo *)on;
if ( modify == 1 && agg.agg_mod ) {
+ rs_reinit( &rs, REP_RESULT );
+
o = *op;
o.o_callback = &null_cb;
o.o_tag = LDAP_REQ_MODIFY;
autogroup_def_t *agd;
autogroup_sc_t ags;
Operation *op;
- SlapReply rs = { REP_RESULT };
slap_callback cb = { 0 };
void *thrctx = ldap_pvt_thread_pool_context();
op->o_callback = &cb;
for (agd = agi->agi_def ; agd ; agd = agd->agd_next) {
+ SlapReply rs = { REP_RESULT };
autogroup_build_def_filter(agd, op);
op->o_tag = LDAP_REQ_ADD;
if ( rc == LDAP_SUCCESS && sc.frontend ) {
+ rs_reinit( &rs, REP_RESULT );
op->ora_e = sc.frontend;
rc = op->o_bd->be_add( op, &rs );
}
if ( rc == LDAP_SUCCESS && sc.config ) {
+ rs_reinit( &rs, REP_RESULT );
op->ora_e = sc.config;
rc = op->o_bd->be_add( op, &rs );
}
return -1;
}
ce = e->e_private;
- if ( be->be_cf_ocs && be->be_cf_ocs->co_cfadd )
+ if ( be->be_cf_ocs && be->be_cf_ocs->co_cfadd ) {
+ rs_reinit( &rs, REP_RESULT );
be->be_cf_ocs->co_cfadd( op, &rs, e, &c );
+ }
/* Iterate through overlays */
if ( oi ) {
slap_overinst *on;
if ( !oe ) {
return -1;
}
- if ( c.bi->bi_cf_ocs && c.bi->bi_cf_ocs->co_cfadd )
+ if ( c.bi->bi_cf_ocs && c.bi->bi_cf_ocs->co_cfadd ) {
+ rs_reinit( &rs, REP_RESULT );
c.bi->bi_cf_ocs->co_cfadd( op, &rs, oe, &c );
+ }
}
}
}
Operation *o, *next, op = {0};
Opheader ohdr = {0};
- SlapReply rs = {0};
op.o_hdr = &ohdr;
op.o_conn = c;
op.o_tag = LDAP_REQ_ABANDON;
for ( o = LDAP_STAILQ_FIRST( &c->c_ops ); o; o=next ) {
+ SlapReply rs = {REP_RESULT};
+
next = LDAP_STAILQ_NEXT( o, o_next );
op.orn_msgid = o->o_msgid;
o->o_abandon = 1;
for (i=0; i<pd.used; i++) {
op->o_req_dn = pd.dn[i];
op->o_req_ndn = pd.ndn[i];
- if ( !slapd_shutdown )
+ if ( !slapd_shutdown ) {
+ rs_reinit( &rs, REP_RESULT );
op->o_bd->be_delete( op, &rs );
+ }
ch_free( pd.ndn[i].bv_val );
ch_free( pd.dn[i].bv_val );
}
{
Modifications mod;
struct berval bv[2];
+ rs_reinit( &rs, REP_RESULT );
/* update context's entryCSN to reflect oldest CSN */
mod.sml_numvals = 1;
mod.sml_values = bv;
Operation nop = *op;
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
slap_callback cb;
- SlapReply nrs = { REP_RESULT };
int i;
int found = 0;
int rc;
rc = LDAP_OTHER;
} else {
+ SlapReply nrs = { REP_RESULT };
+
Debug(LDAP_DEBUG_TRACE,
"==> constraint_violation uri filter = %s\n",
filterstr.bv_val, 0, 0);
Attribute *a, *id = NULL;
slap_callback cb;
Operation o = *op;
- SlapReply r = { REP_SEARCH };
struct berval *url;
Entry *e;
int opattrs,
o.o_bd = select_backend( &o.o_req_ndn, 1 );
if ( o.o_bd && o.o_bd->be_search ) {
+ SlapReply r = { REP_SEARCH };
r.sr_attr_flags = slap_attr_flags( o.ors_attrs );
(void)o.o_bd->be_search( &o, &r );
}
memberof_t *mo = (memberof_t *)on->on_bi.bi_private;
Operation op2 = *op;
- SlapReply rs2 = { REP_RESULT };
slap_callback cb = { 0 };
BackendInfo *bi = op->o_bd->bd_info;
AttributeName an[ 2 ];
op2.ors_tlimit = SLAP_NO_LIMIT;
if ( mci->what & MEMBEROF_IS_GROUP ) {
+ SlapReply rs2 = { REP_RESULT };
+
mc.ad = mo->mo_ad_member;
mc.foundit = 0;
mc.vals = NULL;
}
if ( mci->what & MEMBEROF_IS_MEMBER ) {
+ SlapReply rs2 = { REP_RESULT };
+
mc.ad = mo->mo_ad_memberof;
mc.foundit = 0;
mc.vals = NULL;
if ( rc != LDAP_SUCCESS ) {
if ( rc == LDAP_ALREADY_EXISTS ) {
+ rs_reinit( &sreply, REP_RESULT );
slap_entry2mods( e, &modlist, &text, textbuf, textlen );
modlist->sml_op = LDAP_MOD_ADD;
op->o_tag = LDAP_REQ_MODIFY;
op->o_req_dn = qi->xdn;
op->o_req_ndn = qi->xdn;
+ rs_reinit( &sreply, REP_RESULT );
if ( qi->del ) {
Debug( pcache_debug, "DELETING ENTRY TEMPLATE=%s\n",
OperationBuffer opbuf;
Operation op2;
slap_callback sc = { 0 };
- SlapReply rs = { REP_RESULT };
Filter f = { 0 };
char filtbuf[ LDAP_LUTIL_UUIDSTR_BUFSIZE + STRLENOF( "(entryUUID=)" ) ];
AttributeAssertion ava = ATTRIBUTEASSERTION_INIT;
for ( s = 0; !BER_BVISNULL( &entryUUIDs[ s ] ); s++ ) {
BerVarray vals = NULL;
+ SlapReply rs = { REP_RESULT };
op->ors_filterstr.bv_len = snprintf( filtbuf, sizeof( filtbuf ),
"(entryUUID=%s)", entryUUIDs[ s ].bv_val );
static int
refint_repair(
Operation *op,
- SlapReply *rs,
refint_data *id,
refint_q *rq )
{
dependent_data *dp;
+ SlapReply rs = {REP_RESULT};
int rc;
op->o_callback->sc_response = refint_search_cb;
op->o_ndn = op->o_bd->be_rootndn;
/* search */
- rc = op->o_bd->be_search( op, rs );
+ rc = op->o_bd->be_search( op, &rs );
if ( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
Connection conn = {0};
OperationBuffer opbuf;
Operation *op;
- SlapReply rs = {REP_RESULT};
slap_callback cb = { NULL, NULL, NULL, NULL };
Filter ftop, *fptr;
refint_q *rq;
if ( rq->db != NULL ) {
op->o_bd = rq->db;
- refint_repair( op, &rs, id, rq );
+ refint_repair( op, id, rq );
} else {
BackendDB *be;
if ( be->be_search && be->be_modify ) {
op->o_bd = be;
- refint_repair( op, &rs, id, rq );
+ refint_repair( op, id, rq );
}
}
}
/* If we didn't find an exact match, then try for <= */
if ( findcsn_retry ) {
findcsn_retry = 0;
+ rs_reinit( &frs, REP_RESULT );
goto again;
}
rc = LDAP_NO_SUCH_OBJECT;
syncprov_info_t *si = (syncprov_info_t *)on->on_bi.bi_private;
Modifications mod;
Operation opm;
- SlapReply rsm = { 0 };
+ SlapReply rsm = {REP_RESULT};
slap_callback cb = {0};
BackendDB be;
BackendInfo *bi;
char txtbuf[SLAP_TEXT_BUFLEN];
size_t textlen = sizeof txtbuf;
Entry *e = slap_create_context_csn_entry( opm.o_bd, NULL );
+ rs_reinit( &rsm, REP_RESULT );
slap_mods2entry( &mod, &e, 0, 1, &text, txtbuf, textlen);
opm.ora_e = e;
opm.o_bd->be_add( &opm, &rsm );
if ( mmods ) {
Operation fop;
- SlapReply frs = { REP_RESULT };
int rc;
Filter mf, af;
AttributeAssertion eq = ATTRIBUTEASSERTION_INIT;
for ( i=ndel; i<num; i++ ) {
if ( uuids[i].bv_len != 0 ) {
+ SlapReply frs = { REP_RESULT };
mf.f_av_value = uuids[i];
cb.sc_private = NULL;
fop.ors_slimit = 1;
- frs.sr_nentries = 0;
rc = fop.o_bd->be_search( &fop, &frs );
/* If entry was not found, add to delete list */
{
Backend* be = op->o_bd;
slap_callback cb = { NULL };
- SlapReply rs_search = {REP_RESULT};
SlapReply rs_delete = {REP_RESULT};
- SlapReply rs_modify = {REP_RESULT};
struct nonpresent_entry *np_list, *np_prev;
int rc;
AttributeName an[2];
si->si_refreshDelete |= NP_DELETE_ONE;
for (i=0; uuids[i].bv_val; i++) {
+ SlapReply rs_search = {REP_RESULT};
+
op->ors_slimit = 1;
uf.f_av_value = uuids[i];
filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
Filter *cf, *of;
Filter mmf[2];
AttributeAssertion mmaa;
+ SlapReply rs_search = {REP_RESULT};
memset( &an[0], 0, 2 * sizeof( AttributeName ) );
an[0].an_name = slap_schema.si_ad_entryUUID->ad_cname;
si->si_ridtxt, op->o_req_dn.bv_val, rc );
if ( rs_delete.sr_err == LDAP_NOT_ALLOWED_ON_NONLEAF ) {
+ SlapReply rs_modify = {REP_RESULT};
Modifications mod1, mod2;
mod1.sml_op = LDAP_MOD_REPLACE;
mod1.sml_flags = 0;