From: Volker Lendecke Date: Tue, 6 May 2014 07:11:17 +0000 (+0200) Subject: messaging3: Add messaging_dgm_register_tevent_context X-Git-Url: http://git.samba.org/?p=mat%2Fsamba.git;a=commitdiff_plain;h=a6e49f9cda6ae6c7ded534aca756b2387bdc8978 messaging3: Add messaging_dgm_register_tevent_context Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/include/messages.h b/source3/include/messages.h index 7801dfb3d7..852e8a10b2 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 56643b1ffd..55a6fcfac2 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); +}