From a6e49f9cda6ae6c7ded534aca756b2387bdc8978 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 6 May 2014 09:11:17 +0200 Subject: [PATCH] messaging3: Add messaging_dgm_register_tevent_context Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- source3/include/messages.h | 3 +++ source3/lib/messages_dgm.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/source3/include/messages.h b/source3/include/messages.h index 7801dfb3d70..852e8a10b24 100644 --- a/source3/include/messages.h +++ b/source3/include/messages.h @@ -99,6 +99,9 @@ NTSTATUS messaging_dgm_init(struct messaging_context *msg_ctx, struct messaging_backend **presult); NTSTATUS messaging_dgm_cleanup(struct messaging_context *msg_ctx, pid_t pid); NTSTATUS messaging_dgm_wipe(struct messaging_context *msg_ctx); +void *messaging_dgm_register_tevent_context(TALLOC_CTX *mem_ctx, + struct messaging_context *msg_ctx, + struct tevent_context *ev); NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx, TALLOC_CTX *mem_ctx, diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c index 56643b1ffd6..55a6fcfac21 100644 --- a/source3/lib/messages_dgm.c +++ b/source3/lib/messages_dgm.c @@ -473,3 +473,12 @@ NTSTATUS messaging_dgm_wipe(struct messaging_context *msg_ctx) return NT_STATUS_OK; } + +void *messaging_dgm_register_tevent_context(TALLOC_CTX *mem_ctx, + struct messaging_context *msg_ctx, + struct tevent_context *ev) +{ + struct messaging_dgm_context *ctx = talloc_get_type_abort( + msg_ctx->local->private_data, struct messaging_dgm_context); + return poll_funcs_tevent_register(mem_ctx, ctx->msg_callbacks, ev); +}