ITS#7182 Keep connection IDs for monitoring purposes.

This commit is contained in:
Ondrej Kuznik 2012-03-29 14:28:40 +02:00 committed by Howard Chu
parent f6b8103b78
commit 7c40b6e904
2 changed files with 4 additions and 0 deletions

View file

@ -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;
@ -379,6 +380,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;

View file

@ -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 );