From 56d8d19ac9d857580a233d8264e851883b883c67 Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Mon, 12 Jul 2010 04:04:34 +0200 Subject: 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. --- src/providers/ldap/sdap.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/providers/ldap/sdap.h') diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h index 91d91b85..61e7fe25 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 { -- cgit