summaryrefslogtreecommitdiff
path: root/ctdb/server/ctdb_client.c
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2018-04-18 10:36:05 +1000
committerMartin Schwenke <martins@samba.org>2018-05-01 13:31:19 +0200
commit4eea531416ab0516f82bffa4f35345d8d0785d36 (patch)
tree540f8c04ce934c447c130389008618c5443bf12e /ctdb/server/ctdb_client.c
parentf4fe768ca3518873b24e74ba4857c870fac1e46d (diff)
downloadsamba-4eea531416ab0516f82bffa4f35345d8d0785d36.tar.gz
ctdb-daemon: Move ctdb_init() to the only place it is used
This used to be used by client code but not anymore, so move it to where it is used. Drop the comment because it is wrong. Modernise logging. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/server/ctdb_client.c')
-rw-r--r--ctdb/server/ctdb_client.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/ctdb/server/ctdb_client.c b/ctdb/server/ctdb_client.c
index 574e0e559a0..67c89dee3d0 100644
--- a/ctdb/server/ctdb_client.c
+++ b/ctdb/server/ctdb_client.c
@@ -1579,51 +1579,6 @@ int ctdb_ctrl_get_all_tunables(struct ctdb_context *ctdb,
}
/*
- initialise the ctdb daemon for client applications
-
- NOTE: In current code the daemon does not fork. This is for testing purposes only
- and to simplify the code.
-*/
-struct ctdb_context *ctdb_init(struct tevent_context *ev)
-{
- int ret;
- struct ctdb_context *ctdb;
-
- ctdb = talloc_zero(ev, struct ctdb_context);
- if (ctdb == NULL) {
- DEBUG(DEBUG_ERR,(__location__ " talloc_zero failed.\n"));
- return NULL;
- }
- ctdb->ev = ev;
- /* Wrap early to exercise code. */
- ret = reqid_init(ctdb, INT_MAX-200, &ctdb->idr);
- if (ret != 0) {
- DEBUG(DEBUG_ERR, ("reqid_init failed (%s)\n", strerror(ret)));
- talloc_free(ctdb);
- return NULL;
- }
-
- ret = srvid_init(ctdb, &ctdb->srv);
- if (ret != 0) {
- DEBUG(DEBUG_ERR, ("srvid_init failed (%s)\n", strerror(ret)));
- talloc_free(ctdb);
- return NULL;
- }
-
- ret = ctdb_set_socketname(ctdb, CTDB_SOCKET);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_set_socketname failed.\n"));
- talloc_free(ctdb);
- return NULL;
- }
-
- ctdb->statistics.statistics_start_time = timeval_current();
-
- return ctdb;
-}
-
-
-/*
set some ctdb flags
*/
void ctdb_set_flags(struct ctdb_context *ctdb, unsigned flags)