done:
op->orn_msgid = id;
- if ( frontendDB->be_abandon ) {
- op->o_bd = frontendDB;
- frontendDB->be_abandon( op, rs );
- }
-
- for ( i = 0; i < nbackends; i++ ) {
- op->o_bd = &backends[i];
- if( op->o_bd->be_abandon ) op->o_bd->be_abandon( op, rs );
- }
+ op->o_bd = frontendDB;
+ rs->sr_err = frontendDB->be_abandon( op, rs );
ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
Debug( LDAP_DEBUG_TRACE, "do_abandon: op=%ld %sfound\n",
(long) id, o ? "" : "not ", 0 );
- return LDAP_SUCCESS;
+ return rs->sr_err;
}
+int
+fe_op_abandon( Operation *op, SlapReply *rs )
+{
+ int i;
+
+ for ( i = 0; i < nbackends; i++ ) {
+ op->o_bd = &backends[i];
+ if( op->o_bd->be_abandon ) op->o_bd->be_abandon( op, rs );
+ }
+ return LDAP_SUCCESS;
+}
{
/* c_mutex must be locked by caller */
- Operation *o;
+ Operation *o, *next, op = {0};
+ SlapReply rs = {0};
- LDAP_STAILQ_FOREACH(o, &c->c_ops, o_next) {
+ op.o_tag = LDAP_REQ_ABANDON;
+ for ( o = LDAP_STAILQ_FIRST( &c->c_ops ); o; o=next ) {
+ next = LDAP_STAILQ_NEXT( o, o_next );
+ op.orn_msgid = o->o_msgid;
o->o_abandon = 1;
+ frontendDB->be_abandon( &op, &rs );
}
/* remove pending operations */
frontendDB->bd_info->bi_controls = slap_known_controls;
/* calls */
+ frontendDB->bd_info->bi_op_abandon = fe_op_abandon;
frontendDB->bd_info->bi_op_add = fe_op_add;
frontendDB->bd_info->bi_op_bind = fe_op_bind;
frontendDB->bd_info->bi_op_compare = fe_op_compare;
/*
* frontend operations
*/
-#if 0
LDAP_SLAPD_F (int) fe_op_abandon LDAP_P((Operation *op, SlapReply *rs));
-#endif
LDAP_SLAPD_F (int) fe_op_add LDAP_P((Operation *op, SlapReply *rs));
LDAP_SLAPD_F (int) fe_op_bind LDAP_P((Operation *op, SlapReply *rs));
LDAP_SLAPD_F (int) fe_op_compare LDAP_P((Operation *op, SlapReply *rs));