From: Pierangelo Masarati Date: Fri, 1 Sep 2006 10:41:54 +0000 (+0000) Subject: remove unnecessary assertion; add test for pending ops X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~227 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=faa13725e6ed2847947610a8db4b204fa28ccdf1;p=openldap remove unnecessary assertion; add test for pending ops --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index ea21b7379b..e57977ba0e 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -857,16 +857,15 @@ connection_close( Connection *c ) ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_GET_FD, &sd ); } - if ( !LDAP_STAILQ_EMPTY(&c->c_ops) ) { + if ( !LDAP_STAILQ_EMPTY(&c->c_ops) || + !LDAP_STAILQ_EMPTY(&c->c_pending_ops) ) + { Debug( LDAP_DEBUG_TRACE, "connection_close: deferring conn=%lu sd=%d\n", c->c_connid, sd, 0 ); return; } - /* NOTE: if there's no pending ops, writewaiter must be 0 (ITS#4659) */ - assert( c->c_writewaiter == 0 ); - Debug( LDAP_DEBUG_TRACE, "connection_close: conn=%lu sd=%d\n", c->c_connid, sd, 0 ); @@ -1158,6 +1157,7 @@ operations_error: op->o_cancel = LDAP_TOO_LATE; } } + while ( op->o_cancel != SLAP_CANCEL_NONE && op->o_cancel != SLAP_CANCEL_DONE ) {