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

metze at samba.org metze at samba.org
Fri Oct 14 12:48:21 GMT 2005


Author: metze
Date: 2005-10-14 12:48:20 +0000 (Fri, 14 Oct 2005)
New Revision: 11023

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

Log:
 r10310 at SERNOX:  metze | 2005-09-19 11:21:39 +0200
 - open the winsdb in the wrepl server
 - add dummy function for setup the replication partners
 
 metze

Modified:
   branches/SAMBA_4_0/
   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:10309
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:10310
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/wrepl_server.c
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c	2005-10-14 12:47:57 UTC (rev 11022)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c	2005-10-14 12:48:20 UTC (rev 11023)
@@ -258,6 +258,27 @@
 };
 
 /*
+  open winsdb
+*/
+static NTSTATUS wreplsrv_open_winsdb(struct wreplsrv_service *service)
+{
+	service->wins_db     = winsdb_connect(service);
+	if (!service->wins_db) {
+		return NT_STATUS_INTERNAL_DB_ERROR;
+	}
+
+	return NT_STATUS_OK;
+}
+
+/*
+  setup our replication partners
+*/
+static NTSTATUS wreplsrv_setup_partners(struct wreplsrv_service *service)
+{
+	return NT_STATUS_OK;
+}
+
+/*
   startup the wrepl port 42 server sockets
 */
 static NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service)
@@ -326,9 +347,23 @@
 	task->private = service;
 
 	/*
-	 * TODO: setup up all partners, and open the winsdb
+	 * setup up all partners, and open the winsdb
 	 */
+	status = wreplsrv_open_winsdb(service);
+	if (!NT_STATUS_IS_OK(status)) {
+		task_server_terminate(task, "wreplsrv_task_init: wreplsrv_open_winsdb() failed");
+		return;
+	}
 
+	/*
+	 * setup timed events for each partner we want to pull from
+	 */
+	status = wreplsrv_setup_partners(service);
+	if (!NT_STATUS_IS_OK(status)) {
+		task_server_terminate(task, "wreplsrv_task_init: wreplsrv_setup_partners() failed");
+		return;
+	}
+
 	/* 
 	 * setup listen sockets, so we can anwser requests from our partners,
 	 * which pull from us
@@ -339,10 +374,6 @@
 		return;
 	}
 
-	/*
-	 * TODO: setup timed events for each partner we want to pull from
-	 */
-
 	irpc_add_name(task->msg_ctx, "wrepl_server");
 }
 

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:47:57 UTC (rev 11022)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h	2005-10-14 12:48:20 UTC (rev 11023)
@@ -104,6 +104,9 @@
 	/* the whole wrepl service is in one task */
 	struct task_server *task;
 
+	/* the winsdb handle */
+	struct ldb_context *wins_db;
+
 	/* all incoming connections */
 	struct wreplsrv_in_connection *in_connections;
 



More information about the samba-cvs mailing list