done:
op->orn_msgid = id;
- for ( i = 0; i < nbackends; i++ ) {
- op->o_bd = &backends[i];
- if( op->o_bd->be_abandon ) op->o_bd->be_abandon( op, rs );
- }
+ fe_op_abandon( op, rs );
ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
#endif
return LDAP_SUCCESS;
}
+
+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 ) {
+ (void)op->o_bd->be_abandon( op, rs );
+ }
+ }
+
+ return LDAP_SUCCESS;
+}
{
/* c_mutex must be locked by caller */
- Operation *o;
-
- LDAP_STAILQ_FOREACH(o, &c->c_ops, o_next) {
+ Operation *o, *next, op = {0};
+ SlapReply rs = {0};
+
+ op.o_conn = c;
+ op.o_connid = c->c_connid;
+ 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;
+ fe_op_abandon( &op, &rs );
}
/* remove pending operations */
* operations
*/
LDAP_SLAPD_F (int) do_abandon LDAP_P((Operation *op, SlapReply *rs));
+LDAP_SLAPD_F (int) fe_op_abandon LDAP_P((Operation *op, SlapReply *rs));
LDAP_SLAPD_F (int) do_add LDAP_P((Operation *op, SlapReply *rs));
LDAP_SLAPD_F (int) do_bind LDAP_P((Operation *op, SlapReply *rs));
LDAP_SLAPD_F (int) do_compare LDAP_P((Operation *op, SlapReply *rs));