summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/ctdbd_conn.c7
-rw-r--r--source3/lib/messages.c6
-rw-r--r--source3/lib/messages_dgm.c3
3 files changed, 12 insertions, 4 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 35845eda76d..201c7002905 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -496,8 +496,8 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid,
* We're waiting for a call reply, but an async message has
* crossed. Defer dispatching to the toplevel event loop.
*/
- evt = tevent_add_timer(conn->msg_ctx->event_ctx,
- conn->msg_ctx->event_ctx,
+ evt = tevent_add_timer(messaging_tevent_context(conn->msg_ctx),
+ messaging_tevent_context(conn->msg_ctx),
timeval_zero(),
deferred_message_dispatch,
msg_state);
@@ -747,7 +747,8 @@ NTSTATUS ctdbd_register_msg_ctx(struct ctdbd_connection *conn,
SMB_ASSERT(conn->msg_ctx == NULL);
SMB_ASSERT(conn->fde == NULL);
- if (!(conn->fde = tevent_add_fd(msg_ctx->event_ctx, conn,
+ if (!(conn->fde = tevent_add_fd(messaging_tevent_context(msg_ctx),
+ conn,
ctdb_packet_get_fd(conn->pkt),
TEVENT_FD_READ,
ctdbd_socket_handler,
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index db7257dba54..3d838fe908c 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -868,4 +868,10 @@ struct messaging_backend *messaging_local_backend(
return msg_ctx->local;
}
+struct tevent_context *messaging_tevent_context(
+ struct messaging_context *msg_ctx)
+{
+ return msg_ctx->event_ctx;
+}
+
/** @} **/
diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c
index cf6e19075a8..9b58d9e0336 100644
--- a/source3/lib/messages_dgm.c
+++ b/source3/lib/messages_dgm.c
@@ -232,7 +232,8 @@ NTSTATUS messaging_dgm_init(struct messaging_context *msg_ctx,
}
ctx->tevent_handle = poll_funcs_tevent_register(
- ctx, ctx->msg_callbacks, msg_ctx->event_ctx);
+ ctx, ctx->msg_callbacks,
+ messaging_tevent_context(msg_ctx));
if (ctx->tevent_handle == NULL) {
TALLOC_FREE(result);
return NT_STATUS_NO_MEMORY;