diff options
author | Volker Lendecke <vl@samba.org> | 2015-10-02 22:30:35 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-10-07 23:54:06 +0200 |
commit | a599b96f2928e5c5ec801a8e26b08ef0c082831a (patch) | |
tree | 32f4d0a3e61a7dcb42cdfc749ff9baf24bd26a39 /source3/lib | |
parent | 6cc1e660eeb730b30cbd7bc323648444144db904 (diff) | |
download | samba-a599b96f2928e5c5ec801a8e26b08ef0c082831a.tar.gz |
lib: Remove messaging_tevent_context() dependency from ctdbd_conn.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/ctdbd_conn.c | 12 | ||||
-rw-r--r-- | source3/lib/messages_ctdbd.c | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index f091da7b2f0..990819e089a 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -577,17 +577,15 @@ static void ctdbd_socket_handler(struct tevent_context *event_ctx, */ int ctdbd_register_msg_ctx(struct ctdbd_connection *conn, - struct messaging_context *msg_ctx) + struct messaging_context *msg_ctx, + struct tevent_context *ev) { SMB_ASSERT(conn->msg_ctx == NULL); SMB_ASSERT(conn->fde == NULL); - if (!(conn->fde = tevent_add_fd(messaging_tevent_context(msg_ctx), - conn, - conn->fd, - TEVENT_FD_READ, - ctdbd_socket_handler, - conn))) { + conn->fde = tevent_add_fd(ev, conn, conn->fd, TEVENT_FD_READ, + ctdbd_socket_handler, conn); + if (conn->fde == NULL) { DEBUG(0, ("event_add_fd failed\n")); return ENOMEM; } diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c index a0c8d9050c0..5acd4682955 100644 --- a/source3/lib/messages_ctdbd.c +++ b/source3/lib/messages_ctdbd.c @@ -188,7 +188,8 @@ NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx, return map_nt_error_from_unix(ret); } - ret = ctdbd_register_msg_ctx(ctx->conn, msg_ctx); + ret = ctdbd_register_msg_ctx(ctx->conn, msg_ctx, + messaging_tevent_context(msg_ctx)); if (ret != 0) { DEBUG(10, ("ctdbd_register_msg_ctx failed: %s\n", |