svn commit: samba r10362 - in
branches/tmp/samba4-winsrepl/source/wrepl_server: .
metze at samba.org
metze at samba.org
Tue Sep 20 20:37:28 GMT 2005
Author: metze
Date: 2005-09-20 20:37:28 +0000 (Tue, 20 Sep 2005)
New Revision: 10362
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10362
Log:
repare for pull replication support
metze
Added:
branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_out_connection.c
Modified:
branches/tmp/samba4-winsrepl/source/wrepl_server/config.mk
branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.c
branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.h
Changeset:
Modified: branches/tmp/samba4-winsrepl/source/wrepl_server/config.mk
===================================================================
--- branches/tmp/samba4-winsrepl/source/wrepl_server/config.mk 2005-09-20 20:36:28 UTC (rev 10361)
+++ branches/tmp/samba4-winsrepl/source/wrepl_server/config.mk 2005-09-20 20:37:28 UTC (rev 10362)
@@ -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
Added: branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_out_connection.c
===================================================================
--- branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_out_connection.c 2005-09-20 20:36:28 UTC (rev 10361)
+++ branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_out_connection.c 2005-09-20 20:37:28 UTC (rev 10362)
@@ -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;
+}
Modified: branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.c
===================================================================
--- branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.c 2005-09-20 20:36:28 UTC (rev 10361)
+++ branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.c 2005-09-20 20:37:28 UTC (rev 10362)
@@ -254,6 +254,9 @@
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;
}
Modified: branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.h
===================================================================
--- branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.h 2005-09-20 20:36:28 UTC (rev 10361)
+++ branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.h 2005-09-20 20:37:28 UTC (rev 10362)
@@ -128,6 +128,12 @@
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;
};
More information about the samba-cvs
mailing list