diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-11-03 20:55:02 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-11-03 20:55:02 +0000 |
commit | 9c8e6f04254bb4e2357ddd6b815dbb663be795a0 (patch) | |
tree | d6e61a1a2b6a1467255f4b685b85ae44282bbd91 | |
parent | 8866b2304eca0c0cfc85f7363e16a66ac4cb9e3f (diff) |
call myldap_session_check() before adding a new search to the session so the connection actually gets closed on timeout (the connection isn't closed when there are active searches)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1294 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nslcd/myldap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c index 902adbc..92f0154 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -638,8 +638,6 @@ static int do_open(MYLDAP_SESSION *session) int rc; int sd=-1; struct timeval tv; - /* check if the idle time for the connection has expired */ - myldap_session_check(session); /* if the connection is still there (ie. ldap_unbind() wasn't called) then we can return the cached connection */ if (session->ld!=NULL) @@ -937,6 +935,8 @@ MYLDAP_SEARCH *myldap_search( /* log the call */ log_log(LOG_DEBUG,"myldap_search(base=\"%s\", filter=\"%s\")", base,filter); + /* check if the idle time for the connection has expired */ + myldap_session_check(session); /* allocate a new search entry */ search=myldap_search_new(session,base,scope,filter,attrs); /* find a place in the session where we can register our search */ |