summaryrefslogtreecommitdiff
path: root/nslcd/myldap.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2013-03-09 16:51:21 +0100
committerArthur de Jong <arthur@arthurdejong.org>2013-03-09 19:26:39 +0100
commitbf647108f90a493e72971fc302ec5b231fcc36f6 (patch)
tree707672d631fd6d9326db303da784a90ea67740cc /nslcd/myldap.c
parentd413a643faa8103878d1e977e734029158ef1a7c (diff)
start the nscd invalidator and invalidate the nscd cache after reconnecting to the LDAP server after failure
Diffstat (limited to 'nslcd/myldap.c')
-rw-r--r--nslcd/myldap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c
index c564f4b..e188fb0 100644
--- a/nslcd/myldap.c
+++ b/nslcd/myldap.c
@@ -1195,7 +1195,11 @@ static int do_retry_search(MYLDAP_SEARCH *search)
pthread_mutex_lock(&uris_mutex);
/* 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);
+ /* signal nscd cache invalidation */
+ nscd_invalidate(LM_NONE);
+ }
/* update ok time */
current_uri->firstfail = 0;
current_uri->lastfail = 0;