summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2004-11-17 16:31:45 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2004-11-17 16:31:45 +0000
commit994a09e91130d52c4ae573cf7536eb68f1876883 (patch)
tree11e5e26355d43e8fffecdf293dc07cbd51938f03 /src
parent063b1e99b3c8f8fd646b4db4ad87f36952cc9366 (diff)
Minor tidy to the recent LDAP fix to keep the code for Netscape SDK
unchanged (though I cannot test it).
Diffstat (limited to 'src')
-rw-r--r--src/src/lookups/ldap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/src/lookups/ldap.c b/src/src/lookups/ldap.c
index 330164570..7a21e8e01 100644
--- a/src/src/lookups/ldap.c
+++ b/src/src/lookups/ldap.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/lookups/ldap.c,v 1.3 2004/11/11 12:05:54 ph10 Exp $ */
+/* $Cambridge: exim/src/src/lookups/ldap.c,v 1.4 2004/11/17 16:31:45 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -380,9 +380,14 @@ if (lcp == NULL)
#ifdef LDAP_X_OPT_CONNECT_TIMEOUT
if (tcplimit > 0)
{
- unsigned int timeout1000 = tcplimit*1000;
+ int timeout1000 = tcplimit*1000;
ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, (void *)&timeout1000);
}
+ else
+ {
+ int notimeout = LDAP_X_IO_TIMEOUT_NO_TIMEOUT;
+ ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, (void *)&notimeout);
+ }
#endif
/* Set the TCP connect timeout. This works with OpenLDAP 2.2.14. */