summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap/ldap_client.h
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-04-25 11:50:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:23 -0500
commit8f164299473553ee28f4fbf1d9a120840c5e5feb (patch)
treecf2fad51c66eeaa10375b172baa9ba31ca5665d7 /source4/libcli/ldap/ldap_client.h
parent1e8e6aeb6fed306be4196daca19af284a7fef3cf (diff)
downloadsamba-8f164299473553ee28f4fbf1d9a120840c5e5feb.tar.gz
samba-8f164299473553ee28f4fbf1d9a120840c5e5feb.tar.bz2
samba-8f164299473553ee28f4fbf1d9a120840c5e5feb.zip
r15238: Add some code to automatically reconnect if we want to.
(This used to be commit e2102999e26566543162455b34adbd2b0486b74d)
Diffstat (limited to 'source4/libcli/ldap/ldap_client.h')
-rw-r--r--source4/libcli/ldap/ldap_client.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/source4/libcli/ldap/ldap_client.h b/source4/libcli/ldap/ldap_client.h
index 3f71c42f22..7801f8b6bc 100644
--- a/source4/libcli/ldap/ldap_client.h
+++ b/source4/libcli/ldap/ldap_client.h
@@ -23,7 +23,7 @@
#include "libcli/ldap/ldap.h"
-enum ldap_request_state {LDAP_REQUEST_SEND, LDAP_REQUEST_PENDING, LDAP_REQUEST_DONE};
+enum ldap_request_state { LDAP_REQUEST_SEND=1, LDAP_REQUEST_PENDING=2, LDAP_REQUEST_DONE=3, LDAP_REQUEST_ERROR=4 };
/* this is the handle that the caller gets when an async ldap message
is sent */
@@ -60,6 +60,18 @@ struct ldap_connection {
const char *auth_dn;
const char *simple_pw;
+ struct {
+ char *url;
+ int max_retries;
+ int retries;
+ time_t previous;
+ } reconnect;
+
+ struct {
+ enum { LDAP_BIND_SIMPLE, LDAP_BIND_SASL } type;
+ void *creds;
+ } bind;
+
/* next message id to assign */
unsigned next_messageid;