return(SLAP_CB_CONTINUE);
}
+static int
+translucent_tag_cb( Operation *op, SlapReply *rs )
+{
+ op->o_tag = (ber_tag_t)op->o_callback->sc_private;
+ rs->sr_tag = slap_req2res( op->o_tag );
+
+ return SLAP_CB_CONTINUE;
+}
+
/*
** translucent_modify()
** modify in local backend if exists in both;
Attribute *a, *ax;
Modifications *m, *mm;
int del, rc, erc = 0;
+ slap_callback cb = { 0 }, *save_cb;
Debug(LDAP_DEBUG_TRACE, "==> translucent_modify: %s\n",
op->o_req_dn.bv_val, 0, 0);
op->o_bd->bd_info = (BackendInfo *) on;
glue_parent(&nop);
+ save_cb = op->o_callback;
+ cb.sc_response = translucent_tag_cb;
+ cb.sc_private = (void *)LDAP_REQ_MODIFY;
+ cb.sc_next = nop.o_callback;
+ nop.o_callback = &cb;
rc = on->on_info->oi_orig->bi_op_add(&nop, &nrs);
+ nop.o_callback = save_cb;
free_attr_chain(a);
return(rc);
LDAP_SLAPD_F( void ) slap_mods_opattrs(
Operation *op,
- Modifications *mods,
+ Modifications **modsp,
int manage_ctxcsn );
/*
int *code, char **matched, char **info ));
LDAP_SLAPD_F (int) slap_map_api2result LDAP_P(( SlapReply *rs ));
LDAP_SLAPD_F (slap_mask_t) slap_attr_flags LDAP_P(( AttributeName *an ));
+LDAP_SLAPD_F (ber_tag_t) slap_req2res LDAP_P(( ber_tag_t tag ));
LDAP_SLAPD_V( const struct berval ) slap_dummy_bv;
return v2;
}
-static ber_tag_t req2res( ber_tag_t tag )
+ber_tag_t
+slap_req2res( ber_tag_t tag )
{
switch( tag ) {
case LDAP_REQ_ADD:
if ( op->o_protocol < LDAP_VERSION3 ) {
rs->sr_rspoid = NULL;
- rs->sr_tag = req2res( op->o_tag );
+ rs->sr_tag = slap_req2res( op->o_tag );
rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0;
} else {
rs->sr_ref = NULL;
}
- rs->sr_tag = req2res( op->o_tag );
+ rs->sr_tag = slap_req2res( op->o_tag );
rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0;
abandon:
rs->sr_err,
rs->sr_sasldata ? (long) rs->sr_sasldata->bv_len : -1, NULL );
- rs->sr_tag = req2res( op->o_tag );
+ rs->sr_tag = slap_req2res( op->o_tag );
rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0;
if ( send_ldap_response( op, rs ) == SLAP_CB_CONTINUE ) {
rs->sr_rspoid ? rs->sr_rspoid : "",
rs->sr_rspdata != NULL ? rs->sr_rspdata->bv_len : 0 );
- rs->sr_tag = req2res( op->o_tag );
+ rs->sr_tag = slap_req2res( op->o_tag );
rs->sr_msgid = (rs->sr_tag != LBER_SEQUENCE) ? op->o_msgid : 0;
if ( send_ldap_response( op, rs ) == SLAP_CB_CONTINUE ) {