diff options
author | Martin Schwenke <martin@meltin.net> | 2013-02-05 12:08:11 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-02-05 12:40:30 +1100 |
commit | f2ba0e8a65cfa1bc0d24e513e72d8345e5288814 (patch) | |
tree | b9bfa70183056bf57c86de81eb3771d2bfa53812 /ctdb/common | |
parent | 35074ad6d56d87741b92ff66efc36612cdd1b74e (diff) | |
download | samba-f2ba0e8a65cfa1bc0d24e513e72d8345e5288814.tar.gz samba-f2ba0e8a65cfa1bc0d24e513e72d8345e5288814.tar.xz samba-f2ba0e8a65cfa1bc0d24e513e72d8345e5288814.zip |
Logging: New function ctdb_log_ringbuffer_free()
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a4f622e85168f59417c11705f1734e0352e1d44a)
Diffstat (limited to 'ctdb/common')
-rw-r--r-- | ctdb/common/ctdb_logging.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ctdb/common/ctdb_logging.c b/ctdb/common/ctdb_logging.c index 09b1df222dd..105b4df5996 100644 --- a/ctdb/common/ctdb_logging.c +++ b/ctdb/common/ctdb_logging.c @@ -85,7 +85,14 @@ void log_ringbuffer(const char *format, ...) va_end(ap); } - +void ctdb_log_ringbuffer_free(void) +{ + if (log_entries != NULL) { + free(log_entries); + log_entries = NULL; + } + log_ringbuf_size = 0; +} void ctdb_collect_log(struct ctdb_context *ctdb, struct ctdb_get_log_addr *log_addr) { |