From: Howard Chu Date: Thu, 27 May 2004 08:45:27 +0000 (+0000) Subject: Fix ITS#3160, decrement conn->c_n_ops_pending when removing an op from X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~323 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2c0d735aa764df1e531a7e3e4b1cb400129f59f8;p=openldap Fix ITS#3160, decrement conn->c_n_ops_pending when removing an op from the conn->c_pending_ops queue. --- diff --git a/servers/slapd/abandon.c b/servers/slapd/abandon.c index 96d29297c8..10dab8d82c 100644 --- a/servers/slapd/abandon.c +++ b/servers/slapd/abandon.c @@ -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; } diff --git a/servers/slapd/cancel.c b/servers/slapd/cancel.c index 70f3be3369..005dbba0b2 100644 --- a/servers/slapd/cancel.c +++ b/servers/slapd/cancel.c @@ -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;