svn commit: samba r10310 - in
branches/tmp/samba4-winsrepl/source/wrepl_server: .
metze at samba.org
metze at samba.org
Mon Sep 19 09:21:40 GMT 2005
Author: metze
Date: 2005-09-19 09:21:39 +0000 (Mon, 19 Sep 2005)
New Revision: 10310
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10310
Log:
- open the winsdb in the wrepl server
- add dummy function for setup the replication partners
metze
Modified:
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/wrepl_server.c
===================================================================
--- branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.c 2005-09-19 09:08:37 UTC (rev 10309)
+++ branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.c 2005-09-19 09:21:39 UTC (rev 10310)
@@ -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/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.h
===================================================================
--- branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.h 2005-09-19 09:08:37 UTC (rev 10309)
+++ branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.h 2005-09-19 09:21:39 UTC (rev 10310)
@@ -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