summaryrefslogtreecommitdiffstats
path: root/ctdb/common
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-10-16 20:54:39 +1100
committerMartin Schwenke <martin@meltin.net>2012-10-22 11:15:36 +1100
commitdb5dfe891cf8200c558567878c5c4b77c9d390f9 (patch)
tree167cd2b20aae830adbdc31eafe14e5e46b1490f1 /ctdb/common
parentbc126ccdd4d0bd15804921e9b538f05dff654eff (diff)
downloadsamba-db5dfe891cf8200c558567878c5c4b77c9d390f9.tar.gz
samba-db5dfe891cf8200c558567878c5c4b77c9d390f9.tar.xz
samba-db5dfe891cf8200c558567878c5c4b77c9d390f9.zip
recoverd: Add CTDB_SRVID_GETLOG and CTDB_SRVID_CLEARLOG
These support getting and clearing logs from the ring-buffer in the recovery daemon. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit cbca233d1e03b2410e0bb63b936328d4a8b3c7b4)
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/ctdb_logging.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ctdb/common/ctdb_logging.c b/ctdb/common/ctdb_logging.c
index e3299d3c0f8..09b1df222dd 100644
--- a/ctdb/common/ctdb_logging.c
+++ b/ctdb/common/ctdb_logging.c
@@ -87,7 +87,7 @@ void log_ringbuffer(const char *format, ...)
-static void ctdb_collect_log(struct ctdb_context *ctdb, struct ctdb_get_log_addr *log_addr)
+void ctdb_collect_log(struct ctdb_context *ctdb, struct ctdb_get_log_addr *log_addr)
{
TDB_DATA data;
FILE *f;
@@ -174,12 +174,15 @@ int32_t ctdb_control_get_log(struct ctdb_context *ctdb, TDB_DATA addr)
return 0;
}
-
-int32_t ctdb_control_clear_log(struct ctdb_context *ctdb)
+void ctdb_clear_log(struct ctdb_context *ctdb)
{
first_entry = 0;
last_entry = 0;
+}
+
+int32_t ctdb_control_clear_log(struct ctdb_context *ctdb)
+{
+ ctdb_clear_log(ctdb);
return 0;
}
-