From: Howard Chu Date: Thu, 19 Jan 2017 20:10:38 +0000 (+0000) Subject: ITS#8725 connection fixes X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8b1fb962fc9facdac1ace50f45148e75a239d152;p=openldap ITS#8725 connection fixes Fix op_finish, must resched connection to pick up pending ops. Fix op completion counter. --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 4d464b0b45..b73a9a5346 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1045,6 +1045,10 @@ connection_op_finish( Operation *op ) { Connection *conn = op->o_conn; void *memctx_null = NULL; + slap_op_t opidx = slap_req2op( op->o_tag ); + assert( opidx != SLAP_OP_LAST ); + + INCR_OP_COMPLETED( opidx ); ldap_pvt_thread_mutex_lock( &conn->c_mutex ); @@ -1057,6 +1061,7 @@ connection_op_finish( Operation *op ) LDAP_STAILQ_NEXT(op, o_next) = NULL; conn->c_n_ops_executing--; conn->c_n_ops_completed++; + connection_resched( conn ); ldap_pvt_thread_mutex_unlock( &conn->c_mutex ); }