summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-14 12:56:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:42:35 -0500
commit8aebec1be5bdd768b59d0f0d3a7c59ead9876eb1 (patch)
tree05f5828be77f9969bd2e4d7e570930f465fbf616 /source4
parentf197180d8dc7b052af0fcb47a797bdb1c96019e2 (diff)
downloadsamba-8aebec1be5bdd768b59d0f0d3a7c59ead9876eb1.tar.gz
samba-8aebec1be5bdd768b59d0f0d3a7c59ead9876eb1.tar.xz
samba-8aebec1be5bdd768b59d0f0d3a7c59ead9876eb1.zip
r11043: r10362@SERNOX: metze | 2005-09-20 22:37:28 +0200
repare for pull replication support metze (This used to be commit a75402c45f5bcd3b199ad30af06ee34161c5560b)
Diffstat (limited to 'source4')
-rw-r--r--source4/wrepl_server/config.mk4
-rw-r--r--source4/wrepl_server/wrepl_out_connection.c46
-rw-r--r--source4/wrepl_server/wrepl_server.c3
-rw-r--r--source4/wrepl_server/wrepl_server.h6
4 files changed, 58 insertions, 1 deletions
diff --git a/source4/wrepl_server/config.mk b/source4/wrepl_server/config.mk
index b7275c8a65..18fdcad5e9 100644
--- a/source4/wrepl_server/config.mk
+++ b/source4/wrepl_server/config.mk
@@ -5,7 +5,9 @@
[SUBSYSTEM::WREPL_SRV]
INIT_OBJ_FILES = \
wrepl_server/wrepl_server.o \
- wrepl_server/wrepl_in_call.o
+ wrepl_server/wrepl_in_connection.o \
+ wrepl_server/wrepl_in_call.o \
+ wrepl_server/wrepl_out_connection.o
REQUIRED_SUBSYSTEMS = \
LIBCLI_WREPL WINSDB
# End SUBSYSTEM WREPL_SRV
diff --git a/source4/wrepl_server/wrepl_out_connection.c b/source4/wrepl_server/wrepl_out_connection.c
new file mode 100644
index 0000000000..39406c7e2a
--- /dev/null
+++ b/source4/wrepl_server/wrepl_out_connection.c
@@ -0,0 +1,46 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ WINS Replication server
+
+ Copyright (C) Stefan Metzmacher 2005
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "includes.h"
+#include "dlinklist.h"
+#include "lib/events/events.h"
+#include "lib/socket/socket.h"
+#include "smbd/service_task.h"
+#include "smbd/service_stream.h"
+#include "lib/messaging/irpc.h"
+#include "librpc/gen_ndr/ndr_winsrepl.h"
+#include "wrepl_server/wrepl_server.h"
+#include "nbt_server/wins/winsdb.h"
+#include "ldb/include/ldb.h"
+
+NTSTATUS wreplsrv_setup_out_connections(struct wreplsrv_service *service)
+{
+ struct wreplsrv_partner *cur;
+
+ for (cur = service->partners; cur; cur = cur->next) {
+ if (!(cur->type & WINSREPL_PARTNER_PULL)) continue;
+
+ DEBUG(0,("TODO: pull from: %s\n", cur->address));
+ }
+
+ return NT_STATUS_OK;
+}
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c
index dd49b37d78..97fa23cdf1 100644
--- a/source4/wrepl_server/wrepl_server.c
+++ b/source4/wrepl_server/wrepl_server.c
@@ -254,6 +254,9 @@ static NTSTATUS wreplsrv_setup_partners(struct wreplsrv_service *service)
status = wreplsrv_load_table(service);
NT_STATUS_NOT_OK_RETURN(status);
+ status = wreplsrv_setup_out_connections(service);
+ NT_STATUS_NOT_OK_RETURN(status);
+
return NT_STATUS_OK;
}
diff --git a/source4/wrepl_server/wrepl_server.h b/source4/wrepl_server/wrepl_server.h
index 2448d78bf8..278b15fbb7 100644
--- a/source4/wrepl_server/wrepl_server.h
+++ b/source4/wrepl_server/wrepl_server.h
@@ -128,6 +128,12 @@ struct wreplsrv_partner {
struct {
/* the interval between 2 pull replications to the partner */
uint32_t interval;
+
+ /* this is a list of each wins_owner the partner knows about */
+ struct wreplsrv_owner *table;
+
+ /* the outgoing connection to the partner */
+ struct wreplsrv_out_connection *wreplconn;
} pull;
};