example libctdb.a and test program libctdb/tst.c
[sahlberg/ctdb.git] / libctdb / ctdb_util.c
similarity index 98%
rename from common/ctdb_util.c
rename to libctdb/ctdb_util.c
index 433a2ad8578b29421449984c6af44814f6666af7..d1b396d1c471e2259e035aa6410bc1f3ccdb9509 100644 (file)
 int LogLevel = DEBUG_NOTICE;
 int this_log_level = 0;
 
+ctdb_ringbuf_log_fn *ctdb_ringbuf_log = NULL;
+
+pid_t ctdbd_pid;
+
 /*
   return error string for last error
 */
@@ -685,3 +689,14 @@ const char *ctdb_eventscript_call_names[] = {
        "reload",
        "updateip"
 };
+
+/*
+  setup the local socket name
+*/
+int ctdb_set_socketname(struct ctdb_context *ctdb, const char *socketname)
+{
+       ctdb->daemon.name = talloc_strdup(ctdb, socketname);
+       CTDB_NO_MEMORY(ctdb, ctdb->daemon.name);
+
+       return 0;
+}