struct tevent_context *ev);
struct server_id messaging_server_id(const struct messaging_context *msg_ctx);
+struct tevent_context *messaging_tevent_context(
+ struct messaging_context *msg_ctx);
struct messaging_backend *messaging_local_backend(
struct messaging_context *msg_ctx);
* 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);
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,
}
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;