From de6fe2a1dd6ab03b1c369b61da17fded72305b2d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 16 Nov 2015 08:08:46 +0100 Subject: [PATCH] smbd: Move cleanupd revalidate to a separate fn Simple preparation for the next patch... Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/smbd/server.c | 2 +- source3/smbd/smbd_cleanupd.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 048d2138ad0..9a8820c908c 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -549,7 +549,7 @@ static void cleanup_timeout_fn(struct tevent_context *event_ctx, message_send_all(parent->msg_ctx, MSG_SMB_UNLOCK, NULL, 0, NULL); messaging_send_buf(parent->msg_ctx, parent->cleanupd, - MSG_SMB_BRL_VALIDATE, NULL, 0); + MSG_SMB_UNLOCK, NULL, 0); } static void remove_child_pid(struct smbd_parent_context *parent, diff --git a/source3/smbd/smbd_cleanupd.c b/source3/smbd/smbd_cleanupd.c index 6b423e3cd2c..151d1e1292b 100644 --- a/source3/smbd/smbd_cleanupd.c +++ b/source3/smbd/smbd_cleanupd.c @@ -38,6 +38,10 @@ static void smbd_cleanupd_process_exited(struct messaging_context *msg, void *private_data, uint32_t msg_type, struct server_id server_id, DATA_BLOB *data); +static void smbd_cleanupd_unlock(struct messaging_context *msg, + void *private_data, uint32_t msg_type, + struct server_id server_id, + DATA_BLOB *data); struct tevent_req *smbd_cleanupd_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, @@ -66,8 +70,8 @@ struct tevent_req *smbd_cleanupd_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - status = messaging_register(msg, NULL, MSG_SMB_BRL_VALIDATE, - brl_revalidate); + status = messaging_register(msg, NULL, MSG_SMB_UNLOCK, + smbd_cleanupd_unlock); if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } @@ -85,6 +89,14 @@ static void smbd_cleanupd_shutdown(struct messaging_context *msg, tevent_req_done(req); } +static void smbd_cleanupd_unlock(struct messaging_context *msg, + void *private_data, uint32_t msg_type, + struct server_id server_id, + DATA_BLOB *data) +{ + brl_revalidate(msg, private_data, msg_type, server_id, data); +} + static void smbd_cleanupd_process_exited(struct messaging_context *msg, void *private_data, uint32_t msg_type, struct server_id server_id, -- 2.34.1