Fix ITS#3160, decrement conn->c_n_ops_pending when removing an op from

the conn->c_pending_ops queue.
This commit is contained in:
Howard Chu 2004-05-27 08:45:27 +00:00
parent 650ca42066
commit 2c0d735aa7
2 changed files with 2 additions and 0 deletions

View File

@ -103,6 +103,7 @@ do_abandon( Operation *op, SlapReply *rs )
LDAP_STAILQ_FOREACH( o, &op->o_conn->c_pending_ops, o_next ) {
if ( o->o_msgid == id ) {
LDAP_STAILQ_REMOVE( &op->o_conn->c_pending_ops, o, slap_op, o_next );
op->o_conn->c_n_ops_pending--;
slap_op_free( o );
goto done;
}

View File

@ -66,6 +66,7 @@ int cancel_extop( Operation *op, SlapReply *rs )
LDAP_STAILQ_FOREACH( o, &op->o_conn->c_pending_ops, o_next ) {
if ( o->o_msgid == opid ) {
LDAP_STAILQ_REMOVE( &op->o_conn->c_pending_ops, o, slap_op, o_next );
op->o_conn->c_n_ops_pending--;
slap_op_free( o );
found = 1;
break;