diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-05-09 12:44:36 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-05-09 12:44:36 +0200 |
commit | 9a1a5c2f8efe9e0c1b9d93aa10ab44d338efe527 (patch) | |
tree | 486f85412158eac539de3f8884e87edd66107925 /nslcd | |
parent | 7243ee576876cd3c1a66cb8ff8ec062d1d132991 (diff) |
only log "connected to LDAP server" if the previous connect failed or we are failing over to a different server
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1095 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd')
-rw-r--r-- | nslcd/myldap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c index 6de213f..8d6d0c8 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -675,8 +675,6 @@ static int do_open(MYLDAP_SESSION *session) } /* update last activity and finish off state */ time(&(session->lastactivity)); - log_log(LOG_INFO,"connected to LDAP server %s", - nslcd_cfg->ldc_uris[session->current_uri].uri); return LDAP_SUCCESS; } @@ -838,6 +836,9 @@ static int do_retry_search(MYLDAP_SEARCH *search) pthread_mutex_lock(&uris_mutex); current_uri->firstfail=0; current_uri->lastfail=0; + /* check if we are coming back from an error */ + if ((current_uri->lastfail>0)||(search->session->current_uri!=start_uri)) + log_log(LOG_INFO,"connected to LDAP server %s",current_uri->uri); pthread_mutex_unlock(&uris_mutex); /* flag the search as valid */ search->valid=1; |