]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#3160, decrement conn->c_n_ops_pending when removing an op from
authorHoward Chu <hyc@openldap.org>
Thu, 27 May 2004 08:45:27 +0000 (08:45 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 27 May 2004 08:45:27 +0000 (08:45 +0000)
the conn->c_pending_ops queue.

servers/slapd/abandon.c
servers/slapd/cancel.c

index 96d29297c88ee45c2bb8ee3dba35a70e404135a0..10dab8d82cb6c279f5dc46bd4874b23ac4ceddca 100644 (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;
                }
index 70f3be3369b7187952c72c9cb752c8e62cf0e00d..005dbba0b27e75f9983610d06a8077257a1705fc 100644 (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;