Commit 9f53559f authored by Ondrej Kuznik's avatar Ondrej Kuznik Committed by Quanah Gibson-Mount
Browse files

ITS#7182 Keep connection IDs for monitoring purposes.

parent d3e8c0c7
......@@ -175,6 +175,7 @@ typedef struct ldapconn_t {
#define LDAP_BACK_CONN_CACHED_CLEAR(lc) LDAP_BACK_CONN_CLEAR((lc), LDAP_BACK_FCONN_CACHED)
LDAP *lc_ld;
unsigned long lc_connid;
struct berval lc_cred;
struct berval lc_bound_ndn;
unsigned lc_flags;
......@@ -376,6 +377,8 @@ typedef struct ldapinfo_t {
int li_version;
unsigned long li_conn_nextid;
/* cached connections;
* special conns are in tailq rather than in tree */
ldap_avl_info_t li_conninfo;
......
......@@ -1066,6 +1066,7 @@ retry_lock:
ldap_pvt_thread_mutex_lock( &li->li_conninfo.lai_mutex );
LDAP_BACK_CONN_ISBOUND_CLEAR( lc );
lc->lc_connid = li->li_conn_nextid++;
assert( lc->lc_refcnt == 1 );
......
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