From 9a1a5c2f8efe9e0c1b9d93aa10ab44d338efe527 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 9 May 2010 10:44:36 +0000 Subject: 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 --- nslcd/myldap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nslcd') 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; -- cgit v1.2.3