Author: abartlet
Date: 2006-06-14 23:39:18 +0000 (Wed, 14 Jun 2006)
New Revision: 16234

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16234

Log:
Set the request timeout from the LDAP search.  Without this, the
initial request time is uninitialised, and this causes havoc later.
This also allows us to honour the client's wishes.

We should be doing this for all the operations...

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/ldap_server/ldap_backend.c


Changeset:
Modified: branches/SAMBA_4_0/source/ldap_server/ldap_backend.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_backend.c        2006-06-14 
23:37:19 UTC (rev 16233)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_backend.c        2006-06-14 
23:39:18 UTC (rev 16234)
@@ -247,8 +247,10 @@
 
        lreq->async.context = res;
        lreq->async.callback = ldapsrv_SearchCallback;
-       lreq->async.timeout = 600;
 
+       /* Copy the timeout from the incoming call */
+       ldb_set_timeout(samdb, lreq, req->timelimit);
+
        ldb_ret = ldb_request(samdb, lreq);
 
        if (ldb_ret != LDB_SUCCESS) {

Reply via email to