summaryrefslogtreecommitdiff
path: root/source4/wrepl_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-04-20 12:00:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:11 -0500
commit0082a4ce97c0a4484c1868babb965b172ff3d689 (patch)
tree39fe71a2a95cc4687d119e1bd8773cb06e15bfd8 /source4/wrepl_server
parentc53c91963aaa717c9c612715bd3f01a5a6d76b35 (diff)
downloadsamba-0082a4ce97c0a4484c1868babb965b172ff3d689.tar.gz
samba-0082a4ce97c0a4484c1868babb965b172ff3d689.tar.bz2
samba-0082a4ce97c0a4484c1868babb965b172ff3d689.zip
r15148: make wreplsrv_pull_names static
metze (This used to be commit ce3d4ec0f67ecf7a403fb7d46ed5f6dc0b2bc275)
Diffstat (limited to 'source4/wrepl_server')
-rw-r--r--source4/wrepl_server/wrepl_apply_records.c19
-rw-r--r--source4/wrepl_server/wrepl_out_helpers.c23
-rw-r--r--source4/wrepl_server/wrepl_out_helpers.h12
-rw-r--r--source4/wrepl_server/wrepl_server.h1
4 files changed, 30 insertions, 25 deletions
diff --git a/source4/wrepl_server/wrepl_apply_records.c b/source4/wrepl_server/wrepl_apply_records.c
index c080408ea3..dda208eef3 100644
--- a/source4/wrepl_server/wrepl_apply_records.c
+++ b/source4/wrepl_server/wrepl_apply_records.c
@@ -1377,24 +1377,25 @@ static NTSTATUS wreplsrv_apply_one_record(struct wreplsrv_partner *partner,
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 @@ NTSTATUS wreplsrv_apply_records(struct wreplsrv_partner *partner, struct wreplsr
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;
diff --git a/source4/wrepl_server/wrepl_out_helpers.c b/source4/wrepl_server/wrepl_out_helpers.c
index 8be6cab85e..968c2fdc37 100644
--- a/source4/wrepl_server/wrepl_out_helpers.c
+++ b/source4/wrepl_server/wrepl_out_helpers.c
@@ -388,6 +388,18 @@ static NTSTATUS wreplsrv_pull_table_recv(struct composite_context *c, TALLOC_CTX
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 @@ static void wreplsrv_pull_names_handler_req(struct wrepl_request *req)
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 @@ failed:
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 @@ static NTSTATUS wreplsrv_pull_cycle_apply_records(struct wreplsrv_pull_cycle_sta
{
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);
diff --git a/source4/wrepl_server/wrepl_out_helpers.h b/source4/wrepl_server/wrepl_out_helpers.h
index 5154ca3f9c..1258ae6fb9 100644
--- a/source4/wrepl_server/wrepl_out_helpers.h
+++ b/source4/wrepl_server/wrepl_out_helpers.h
@@ -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;
diff --git a/source4/wrepl_server/wrepl_server.h b/source4/wrepl_server/wrepl_server.h
index 58e021f281..b893814edf 100644
--- a/source4/wrepl_server/wrepl_server.h
+++ b/source4/wrepl_server/wrepl_server.h
@@ -309,5 +309,6 @@ struct wreplsrv_service {
};
struct socket_context;
+struct wrepl_name;
#include "wrepl_server/wrepl_out_helpers.h"
#include "wrepl_server/wrepl_server_proto.h"