diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-05-09 12:39:45 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-05-09 12:39:45 +0200 |
commit | 7243ee576876cd3c1a66cb8ff8ec062d1d132991 (patch) | |
tree | bcdd065932c0f41f3302e447170dc57764bd9eb9 /nslcd/myldap.c | |
parent | 1f1a33c37dbb42e30d6aaa0326b294ab46d6971a (diff) |
rename reconnect_maxsleeptime option to reconnect_retrytime
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1094 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/myldap.c')
-rw-r--r-- | nslcd/myldap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c index dec8492..6de213f 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -805,7 +805,7 @@ static int do_retry_search(MYLDAP_SEARCH *search) for (start_uri=0;start_uri<NSS_LDAP_CONFIG_URI_MAX;start_uri++) dotry[start_uri]=1; /* keep trying until we time out */ - endtime=time(NULL)+nslcd_cfg->ldc_reconnect_maxsleeptime; + endtime=time(NULL)+nslcd_cfg->ldc_reconnect_retrytime; while (1) { nexttry=endtime; @@ -818,8 +818,8 @@ static int do_retry_search(MYLDAP_SEARCH *search) /* only try this URI if we should */ if (!dotry[search->session->current_uri]) { /* skip this URI */ } - else if ( (current_uri->lastfail > (current_uri->firstfail+nslcd_cfg->ldc_reconnect_maxsleeptime)) && - ((t=time(NULL)) < (current_uri->lastfail+nslcd_cfg->ldc_reconnect_maxsleeptime)) ) + else if ( (current_uri->lastfail > (current_uri->firstfail+nslcd_cfg->ldc_reconnect_retrytime)) && + ((t=time(NULL)) < (current_uri->lastfail+nslcd_cfg->ldc_reconnect_retrytime)) ) { /* we are in a hard fail state and have retried not long ago */ log_log(LOG_DEBUG,"not retrying server %s which failed just %d second(s) ago and has been failing for %d seconds", @@ -860,7 +860,7 @@ static int do_retry_search(MYLDAP_SEARCH *search) (rc==LDAP_AUTH_METHOD_NOT_SUPPORTED)) dotry[search->session->current_uri]=0; /* check whether we should try this URI again */ - else if (t <= (current_uri->firstfail+nslcd_cfg->ldc_reconnect_maxsleeptime)) + else if (t <= (current_uri->firstfail+nslcd_cfg->ldc_reconnect_retrytime)) { t+=nslcd_cfg->ldc_reconnect_sleeptime; if (t<nexttry) |