[evolution-patches] [Addressbook] Patch to allow env override of	the LDAP result timeout interval
- From: Harish Krishnaswamy <kharish novell com>
 
- To: evolution-patches <evolution-patches gnome org>,	Sushma Rai <rsushma novell com>
 
- Cc: 
 
- Subject: [evolution-patches] [Addressbook] Patch to allow env override of	the LDAP result timeout interval
 
- Date: Wed, 30 Nov 2005 18:37:05 +0530
 
hi,
 Patch description : as in the Subject
 kindly review the same.
thanks,
harish
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.328
diff -u -p -r1.328 ChangeLog
--- ChangeLog	29 Nov 2005 11:09:16 -0000	1.328
+++ ChangeLog	30 Nov 2005 13:03:09 -0000
@@ -1,3 +1,8 @@
+2005-11-30  Harish Krishnaswamy  <kharish novell com>
+
+	* backends/ldap/e-book-backend-ldap.c: (poll_ldap):
+	Allow environment override of the LDAP result timeout.
+
 2005-11-29  Sushma Rai  <rsushma novell com>
 
 	* backends/ldap/e-book-backend-ldap.c: Added support for environment
Index: backends/ldap/e-book-backend-ldap.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/ldap/e-book-backend-ldap.c,v
retrieving revision 1.53
diff -u -p -r1.53 e-book-backend-ldap.c
--- backends/ldap/e-book-backend-ldap.c	29 Nov 2005 11:09:16 -0000	1.53
+++ backends/ldap/e-book-backend-ldap.c	30 Nov 2005 13:03:12 -0000
@@ -3504,6 +3504,7 @@ poll_ldap (EBookBackendLDAP *bl)
 	int            rc;
 	LDAPMessage    *res;
 	struct timeval timeout;
+	const char *ldap_timeout_string;
 
 	g_static_rec_mutex_lock (&eds_ldap_handler_lock);
 	ldap = bl->priv->ldap;
@@ -3521,7 +3522,12 @@ poll_ldap (EBookBackendLDAP *bl)
 	}
 
 	timeout.tv_sec = 0;
-	timeout.tv_usec = LDAP_RESULT_TIMEOUT_MILLIS * 1000;
+	ldap_timeout_string = g_getenv ("LDAP_TIMEOUT");
+	if (ldap_timeout_string) {
+		timeout.tv_usec = g_ascii_strtod (ldap_timeout_string, NULL) * 1000;
+	}
+	else
+		timeout.tv_usec = LDAP_RESULT_TIMEOUT_MILLIS * 1000;
 
 	g_static_rec_mutex_lock (&eds_ldap_handler_lock);
 	rc = ldap_result (ldap, LDAP_RES_ANY, 0, &timeout, &res);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]