svn commit: samba r15148 - in branches/SAMBA_4_0/source/wrepl_server: .

metze at samba.org metze at samba.org
Thu Apr 20 12:00:39 GMT 2006


Author: metze
Date: 2006-04-20 12:00:38 +0000 (Thu, 20 Apr 2006)
New Revision: 15148

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15148

Log:
make wreplsrv_pull_names static

metze
Modified:
   branches/SAMBA_4_0/source/wrepl_server/wrepl_apply_records.c
   branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.c
   branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.h
   branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h


Changeset:
Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_apply_records.c
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_apply_records.c	2006-04-20 11:42:03 UTC (rev 15147)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_apply_records.c	2006-04-20 12:00:38 UTC (rev 15148)
@@ -1377,24 +1377,25 @@
 	return NT_STATUS_INTERNAL_ERROR;
 }
 
-NTSTATUS wreplsrv_apply_records(struct wreplsrv_partner *partner, struct wreplsrv_pull_names_io *names_io)
+NTSTATUS wreplsrv_apply_records(struct wreplsrv_partner *partner,
+				struct wrepl_wins_owner *owner,
+				uint32_t num_names, struct wrepl_name *names)
 {
 	NTSTATUS status;
 	uint32_t i;
 
 	DEBUG(4,("apply records count[%u]:owner[%s]:min[%llu]:max[%llu]:partner[%s]\n",
-		names_io->out.num_names, names_io->in.owner.address,
-		(long long)names_io->in.owner.min_version, 
-		(long long)names_io->in.owner.max_version,
+		num_names, owner->address,
+		(long long)owner->min_version, 
+		(long long)owner->max_version,
 		partner->address));
 
-	for (i=0; i < names_io->out.num_names; i++) {
+	for (i=0; i < num_names; i++) {
 		TALLOC_CTX *tmp_mem = talloc_new(partner);
 		NT_STATUS_HAVE_NO_MEMORY(tmp_mem);
 
 		status = wreplsrv_apply_one_record(partner, tmp_mem,
-						   &names_io->in.owner,
-						   &names_io->out.names[i]);
+						   owner, &names[i]);
 		talloc_free(tmp_mem);
 		NT_STATUS_NOT_OK_RETURN(status);
 	}
@@ -1402,8 +1403,8 @@
 	status = wreplsrv_add_table(partner->service,
 				    partner->service,
 				    &partner->service->table,
-				    names_io->in.owner.address,
-				    names_io->in.owner.max_version);
+				    owner->address,
+				    owner->max_version);
 	NT_STATUS_NOT_OK_RETURN(status);
 
 	return NT_STATUS_OK;

Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.c
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.c	2006-04-20 11:42:03 UTC (rev 15147)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.c	2006-04-20 12:00:38 UTC (rev 15148)
@@ -388,6 +388,18 @@
 	return status;	
 }
 
+struct wreplsrv_pull_names_io {
+	struct {
+		struct wreplsrv_partner *partner;
+		struct wreplsrv_out_connection *wreplconn;
+		struct wrepl_wins_owner owner;
+	} in;
+	struct {
+		uint32_t num_names;
+		struct wrepl_name *names;
+	} out;
+};
+
 enum wreplsrv_pull_names_stage {
 	WREPLSRV_PULL_NAMES_STAGE_WAIT_CONNECTION,
 	WREPLSRV_PULL_NAMES_STAGE_WAIT_SEND_REPLY,
@@ -479,7 +491,7 @@
 	return;
 }
 
-struct composite_context *wreplsrv_pull_names_send(TALLOC_CTX *mem_ctx, struct wreplsrv_pull_names_io *io)
+static struct composite_context *wreplsrv_pull_names_send(TALLOC_CTX *mem_ctx, struct wreplsrv_pull_names_io *io)
 {
 	struct composite_context *c = NULL;
 	struct wreplsrv_service *service = io->in.partner->service;
@@ -513,8 +525,8 @@
 	return NULL;
 }
 
-NTSTATUS wreplsrv_pull_names_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
-				  struct wreplsrv_pull_names_io *io)
+static NTSTATUS wreplsrv_pull_names_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
+					 struct wreplsrv_pull_names_io *io)
 {
 	NTSTATUS status;
 
@@ -671,7 +683,10 @@
 {
 	NTSTATUS status;
 
-	status = wreplsrv_apply_records(state->io->in.partner, &state->names_io);
+	status = wreplsrv_apply_records(state->io->in.partner,
+					&state->names_io.in.owner,
+					state->names_io.out.num_names,
+					state->names_io.out.names);
 	NT_STATUS_NOT_OK_RETURN(status);
 
 	talloc_free(state->names_io.out.names);

Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.h
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.h	2006-04-20 11:42:03 UTC (rev 15147)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.h	2006-04-20 12:00:38 UTC (rev 15148)
@@ -20,18 +20,6 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-struct wreplsrv_pull_names_io {
-	struct {
-		struct wreplsrv_partner *partner;
-		struct wreplsrv_out_connection *wreplconn;
-		struct wrepl_wins_owner owner;
-	} in;
-	struct {
-		uint32_t num_names;
-		struct wrepl_name *names;
-	} out;
-};
-
 struct wreplsrv_pull_cycle_io {
 	struct {
 		struct wreplsrv_partner *partner;

Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h	2006-04-20 11:42:03 UTC (rev 15147)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h	2006-04-20 12:00:38 UTC (rev 15148)
@@ -309,5 +309,6 @@
 };
 
 struct socket_context;
+struct wrepl_name;
 #include "wrepl_server/wrepl_out_helpers.h"
 #include "wrepl_server/wrepl_server_proto.h"



More information about the samba-cvs mailing list