summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-04-25 12:34:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:23 -0500
commit13f17436ea98544315dcf119b0a395a8359fb3e9 (patch)
treef89827dcbd86de3bb85b074239491e531cb8c5e4
parentf1c2b22d534fa628cce3ce8f248216770865abf8 (diff)
downloadsamba-13f17436ea98544315dcf119b0a395a8359fb3e9.tar.gz
samba-13f17436ea98544315dcf119b0a395a8359fb3e9.tar.bz2
samba-13f17436ea98544315dcf119b0a395a8359fb3e9.zip
r15241: Add helper function to set reconnect status defaults
(This used to be commit 6fff8f871a607e561531e2aabef37f3469aa85e9)
-rw-r--r--source4/libcli/ldap/ldap_client.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 344605f4ec..74ac64a68d 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -438,6 +438,17 @@ NTSTATUS ldap_connect(struct ldap_connection *conn, const char *url)
return ldap_connect_recv(ctx);
}
+/* set reconnect parameters */
+
+void ldap_set_reconn_params(struct ldap_connection *conn, int max_retries)
+{
+ if (conn) {
+ conn->reconnect.max_retries = max_retries;
+ conn->reconnect.retries = 0;
+ conn->reconnect.previous = time(NULL);
+ }
+}
+
/* Actually this function is NOT ASYNC safe, FIXME? */
static void ldap_reconnect(struct ldap_connection *conn)
{