smbd: Move cleanupd revalidate to a separate fn
authorVolker Lendecke <vl@samba.org>
Mon, 16 Nov 2015 07:08:46 +0000 (08:08 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 16 Nov 2015 13:51:33 +0000 (14:51 +0100)
Simple preparation for the next patch...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/server.c
source3/smbd/smbd_cleanupd.c

index 048d2138ad0bf5236a03a1181d7fb57ecd96d0c8..9a8820c908c8d7fed3329a186f3df411ce2fc106 100644 (file)
@@ -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,
index 6b423e3cd2cb9502bcd9d3aee02165d7a6706730..151d1e1292b9fc6522da0174e7d2150697e80e69 100644 (file)
@@ -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,