summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap.h
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2010-07-12 04:04:34 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-09-02 12:23:18 -0400
commit56d8d19ac9d857580a233d8264e851883b883c67 (patch)
tree8cb6e8236a24d230ea51f46fe22cd68fd4574e13 /src/providers/ldap/sdap.h
parent602fa2c3ef0d088b7b834e9d2ebb306d104a79ce (diff)
downloadsssd-56d8d19ac9d857580a233d8264e851883b883c67.tar.gz
sssd-56d8d19ac9d857580a233d8264e851883b883c67.tar.xz
sssd-56d8d19ac9d857580a233d8264e851883b883c67.zip
Make ldap bind asynchronous
Every ldap function that could possibly create a new connection is now wrapped in a tevent_req. If the connection is created, we will call the function again after the socket is ready for writing.
Diffstat (limited to 'src/providers/ldap/sdap.h')
-rw-r--r--src/providers/ldap/sdap.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index 91d91b859..61e7fe254 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -45,6 +45,7 @@ struct sdap_op;
typedef void (sdap_op_callback_t)(struct sdap_op *op,
struct sdap_msg *, int, void *);
+typedef int (fd_wakeup_callback_t)(void *);
struct sdap_handle;
@@ -63,18 +64,33 @@ struct sdap_op {
struct sdap_msg *last;
};
+struct ldap_cb_data;
+
+struct request_spy {
+ struct fd_event_item *ptr;
+};
+
struct fd_event_item {
struct fd_event_item *prev;
struct fd_event_item *next;
int fd;
struct tevent_fd *fde;
+
+ struct ldap_cb_data *cb_data;
+ fd_wakeup_callback_t *fd_wakeup_cb;
+ void *fd_wakeup_cb_data;
+ struct request_spy *spy;
+ struct tevent_timer *timeout_watcher;
};
struct ldap_cb_data {
struct sdap_handle *sh;
struct tevent_context *ev;
struct fd_event_item *fd_list;
+
+ fd_wakeup_callback_t *wakeup_cb;
+ void *wakeup_cb_data;
};
struct sdap_handle {