]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
Do not require ac/string.h for lber_pvt.h
[openldap] / servers / slapd / connection.c
index 4d464b0b45f061f909d0911949b581155c736425..9d9bb1e60898cd5a0c7289710872418353c3775d 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2017 The OpenLDAP Foundation.
+ * Copyright 1998-2018 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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 );
 }