lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1095 - nss-pam-ldapd/nslcd

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1095 - nss-pam-ldapd/nslcd



Author: arthur
Date: Sun May  9 12:44:36 2010
New Revision: 1095
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1095

Log:
only log "connected to LDAP server" if the previous connect failed or we are 
failing over to a different server

Modified:
   nss-pam-ldapd/nslcd/myldap.c

Modified: nss-pam-ldapd/nslcd/myldap.c
==============================================================================
--- nss-pam-ldapd/nslcd/myldap.c        Sun May  9 12:39:45 2010        (r1094)
+++ nss-pam-ldapd/nslcd/myldap.c        Sun May  9 12:44:36 2010        (r1095)
@@ -675,8 +675,6 @@
   }
   /* 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 @@
           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;
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits