lists.arthurdejong.org
RSS feed

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

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

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



Author: arthur
Date: Wed Nov  3 21:55:02 2010
New Revision: 1294
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1294

Log:
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)

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

Modified: nss-pam-ldapd/nslcd/myldap.c
==============================================================================
--- nss-pam-ldapd/nslcd/myldap.c        Fri Oct 29 18:15:38 2010        (r1293)
+++ nss-pam-ldapd/nslcd/myldap.c        Wed Nov  3 21:55:02 2010        (r1294)
@@ -638,8 +638,6 @@
   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 @@
   /* 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 */
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits