return 0;
}
-/*
- 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 event_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;
- ctdb->idr = idr_init(ctdb);
- CTDB_NO_MEMORY_NULL(ctdb, ctdb->idr);
-
- ret = ctdb_set_socketname(ctdb, CTDB_PATH);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_set_socketname failed.\n"));
- talloc_free(ctdb);
- return NULL;
- }
-
- return ctdb;
-}
-
-
/*
set some ctdb flags
*/