1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r15241: Add helper function to set reconnect status defaults

(This used to be commit 6fff8f871a)
This commit is contained in:
Simo Sorce 2006-04-25 12:34:13 +00:00 committed by Gerald (Jerry) Carter
parent f1c2b22d53
commit 13f17436ea

View File

@ -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)
{