Author: metze Date: 2005-10-14 12:56:42 +0000 (Fri, 14 Oct 2005) New Revision: 11043
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11043 Log: [EMAIL PROTECTED]: metze | 2005-09-20 22:37:28 +0200 repare for pull replication support metze Added: branches/SAMBA_4_0/source/wrepl_server/wrepl_out_connection.c Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/wrepl_server/config.mk branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h Changeset: Property changes on: branches/SAMBA_4_0 ___________________________________________________________________ Name: svk:merge - 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/tmp/samba4-winsrepl:10361 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495 a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11632 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5616 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5609 + 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/tmp/samba4-winsrepl:10362 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495 a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11632 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5616 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5609 Modified: branches/SAMBA_4_0/source/wrepl_server/config.mk =================================================================== --- branches/SAMBA_4_0/source/wrepl_server/config.mk 2005-10-14 12:56:26 UTC (rev 11042) +++ branches/SAMBA_4_0/source/wrepl_server/config.mk 2005-10-14 12:56:42 UTC (rev 11043) @@ -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/SAMBA_4_0/source/wrepl_server/wrepl_out_connection.c =================================================================== --- branches/SAMBA_4_0/source/wrepl_server/wrepl_out_connection.c 2005-10-14 12:56:26 UTC (rev 11042) +++ branches/SAMBA_4_0/source/wrepl_server/wrepl_out_connection.c 2005-10-14 12:56:42 UTC (rev 11043) @@ -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/SAMBA_4_0/source/wrepl_server/wrepl_server.c =================================================================== --- branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c 2005-10-14 12:56:26 UTC (rev 11042) +++ branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c 2005-10-14 12:56:42 UTC (rev 11043) @@ -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/SAMBA_4_0/source/wrepl_server/wrepl_server.h =================================================================== --- branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h 2005-10-14 12:56:26 UTC (rev 11042) +++ branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h 2005-10-14 12:56:42 UTC (rev 11043) @@ -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; };