[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Mon Jun 30 09:20:05 MDT 2014


The branch, master has been updated
       via  654ca05 smbd: Make messaging_send_to_children static
       via  fa2d7d6 smbd: Use common function for FORCE_DIS and KILL_CLIENT_IP in parent
      from  cee1531 s3: SMB2 : Fix leak of blocking lock records in the database.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 654ca0590aa410a7a889003f4bc219f7193a7447
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Jun 26 14:51:23 2014 -0700

    smbd: Make messaging_send_to_children static
    
    This function is only used in server.c
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Mon Jun 30 17:20:00 CEST 2014 on sn-devel-104

commit fa2d7d648cec04c4abaf25bcc4ccb0a81a9ca2b7
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Jun 26 14:50:38 2014 -0700

    smbd: Use common function for FORCE_DIS and KILL_CLIENT_IP in parent
    
    The parent smbd process only forwards the message to the child
    processes. Use a common function instead of two separate ones that do
    the same thing.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/proto.h  |    2 --
 source3/smbd/server.c |   37 +++++++++++++------------------------
 2 files changed, 13 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index b25ef7b..ea2f022 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -961,8 +961,6 @@ void delete_and_reload_printers(struct tevent_context *ev,
 bool reload_services(struct smbd_server_connection *sconn,
 		     bool (*snumused) (struct smbd_server_connection *, int),
 		     bool test);
-NTSTATUS messaging_send_to_children(struct messaging_context *msg_ctx,
-				    uint32_t msg_type, DATA_BLOB* data);
 
 /* The following definitions come from smbd/server_exit.c  */
 
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 40684ad..bafd493 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -194,8 +194,8 @@ static void msg_inject_fault(struct messaging_context *msg,
 }
 #endif /* DEVELOPER */
 
-NTSTATUS messaging_send_to_children(struct messaging_context *msg_ctx,
-				    uint32_t msg_type, DATA_BLOB* data)
+static NTSTATUS messaging_send_to_children(struct messaging_context *msg_ctx,
+					   uint32_t msg_type, DATA_BLOB* data)
 {
 	NTSTATUS status;
 	struct smbd_parent_context *parent = am_parent;
@@ -216,6 +216,15 @@ NTSTATUS messaging_send_to_children(struct messaging_context *msg_ctx,
 	return NT_STATUS_OK;
 }
 
+static void smb_parent_send_to_children(struct messaging_context *ctx,
+					void* data,
+					uint32_t msg_type,
+					struct server_id srv_id,
+					DATA_BLOB* msg_data)
+{
+	messaging_send_to_children(ctx, msg_type, msg_data);
+}
+
 /*
  * Parent smbd process sets its own debug level first and then
  * sends a message to all the smbd children to adjust their debug
@@ -361,26 +370,6 @@ static void smbd_parent_notify_proxy_done(struct tevent_req *req)
 	DEBUG(1, ("notify proxy job ended with %s\n", strerror(ret)));
 }
 
-static void smb_parent_force_tdis(struct messaging_context *ctx,
-				  void* data,
-				  uint32_t msg_type,
-				  struct server_id srv_id,
-				  DATA_BLOB* msg_data)
-{
-	messaging_send_to_children(ctx, msg_type, msg_data);
-}
-
-static void smb_parent_kill_client_by_ip(struct messaging_context *ctx,
-					 void *data,
-					 uint32_t msg_type,
-					 struct server_id srv_id,
-					 DATA_BLOB* msg_data)
-{
-	if (am_parent) {
-		messaging_send_to_children(ctx, msg_type, msg_data);
-	}
-}
-
 static void add_child_pid(struct smbd_parent_context *parent,
 			  pid_t pid)
 {
@@ -910,9 +899,9 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
 	messaging_register(msg_ctx, NULL, MSG_SMB_BRL_VALIDATE,
 			   brl_revalidate);
 	messaging_register(msg_ctx, NULL, MSG_SMB_FORCE_TDIS,
-			   smb_parent_force_tdis);
+			   smb_parent_send_to_children);
 	messaging_register(msg_ctx, NULL, MSG_SMB_KILL_CLIENT_IP,
-			   smb_parent_kill_client_by_ip);
+			   smb_parent_send_to_children);
 	messaging_register(msg_ctx, NULL, MSG_SMB_TELL_NUM_CHILDREN,
 			   smb_tell_num_children);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list