Commit 76f281a3 authored by Ondrej Kuznik's avatar Ondrej Kuznik Committed by Quanah Gibson-Mount
Browse files

ITS#7182 Introduce the variables for operation monitoring.

Only completed operations are considered for now, this can be changed
if needed.
parent 300433ac
......@@ -406,6 +406,9 @@ typedef struct ldapinfo_t {
time_t li_conn_ttl;
time_t li_idle_timeout;
time_t li_timeout[ SLAP_OP_LAST ];
ldap_pvt_thread_mutex_t li_counter_mutex;
ldap_pvt_mp_t li_ops_completed[SLAP_OP_LAST];
} ldapinfo_t;
#define LDAP_ERR_OK(err) ((err) == LDAP_SUCCESS || (err) == LDAP_COMPARE_FALSE || (err) == LDAP_COMPARE_TRUE)
......
......@@ -180,6 +180,11 @@ ldap_back_db_init( Backend *be, ConfigReply *cr )
}
li->li_conn_priv_max = LDAP_BACK_CONN_PRIV_DEFAULT;
ldap_pvt_thread_mutex_init( &li->li_counter_mutex );
for ( i = 0; i < SLAP_OP_LAST; i++ ) {
ldap_pvt_mp_init( li->li_ops_completed[ i ] );
}
be->be_private = li;
SLAP_DBFLAGS( be ) |= SLAP_DBFLAG_NOLASTMOD;
......@@ -336,6 +341,11 @@ ldap_back_db_destroy( Backend *be, ConfigReply *cr )
ldap_pvt_thread_mutex_unlock( &li->li_conninfo.lai_mutex );
ldap_pvt_thread_mutex_destroy( &li->li_conninfo.lai_mutex );
ldap_pvt_thread_mutex_destroy( &li->li_uri_mutex );
for ( i = 0; i < SLAP_OP_LAST; i++ ) {
ldap_pvt_mp_clear( li->li_ops_completed[ i ] );
}
ldap_pvt_thread_mutex_destroy( &li->li_counter_mutex );
}
ch_free( be->be_private );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment