From 2c0d735aa764df1e531a7e3e4b1cb400129f59f8 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 27 May 2004 08:45:27 +0000 Subject: [PATCH] Fix ITS#3160, decrement conn->c_n_ops_pending when removing an op from the conn->c_pending_ops queue. --- servers/slapd/abandon.c | 1 + servers/slapd/cancel.c | 1 + 2 files changed, 2 insertions(+) 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; -- 2.39.5