summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcli/cldap/cldap.c4
-rw-r--r--libcli/cldap/cldap.h1
-rw-r--r--source4/cldap_server/cldap_server.c3
3 files changed, 6 insertions, 2 deletions
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c
index a5a0e41598..7436bea407 100644
--- a/libcli/cldap/cldap.c
+++ b/libcli/cldap/cldap.c
@@ -86,6 +86,7 @@ struct cldap_socket {
/* what to do with incoming request packets */
struct {
+ struct tevent_context *ev;
void (*handler)(struct cldap_socket *,
void *private_data,
struct cldap_incoming *);
@@ -381,6 +382,7 @@ nterror:
setup a handler for incoming requests
*/
NTSTATUS cldap_set_incoming_handler(struct cldap_socket *c,
+ struct tevent_context *ev,
void (*handler)(struct cldap_socket *,
void *private_data,
struct cldap_incoming *),
@@ -394,7 +396,7 @@ NTSTATUS cldap_set_incoming_handler(struct cldap_socket *c,
if (c->event.allow_poll) {
return NT_STATUS_INVALID_PIPE_STATE;
}
-
+ c->incoming.ev = ev;
c->incoming.handler = handler;
c->incoming.private_data = private_data;
diff --git a/libcli/cldap/cldap.h b/libcli/cldap/cldap.h
index d1197481fb..0098da521a 100644
--- a/libcli/cldap/cldap.h
+++ b/libcli/cldap/cldap.h
@@ -58,6 +58,7 @@ NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx,
struct cldap_socket **_cldap);
NTSTATUS cldap_set_incoming_handler(struct cldap_socket *cldap,
+ struct tevent_context *ev,
void (*handler)(struct cldap_socket *,
void *private_data,
struct cldap_incoming *),
diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c
index d3e8b7fffa..111493672d 100644
--- a/source4/cldap_server/cldap_server.c
+++ b/source4/cldap_server/cldap_server.c
@@ -138,7 +138,8 @@ static NTSTATUS cldapd_add_socket(struct cldapd_server *cldapd, struct loadparm_
}
talloc_free(socket_address);
- cldap_set_incoming_handler(cldapsock, cldapd_request_handler, cldapd);
+ cldap_set_incoming_handler(cldapsock, cldapd->task->event_ctx,
+ cldapd_request_handler, cldapd);
return NT_STATUS_OK;
}