diff options
author | Martin Schwenke <martin@meltin.net> | 2022-06-06 17:57:51 +1000 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2022-06-16 12:42:35 +0000 |
commit | 88f35cf86285b7a818282d5f465711de66dfad59 (patch) | |
tree | f1a8cd71d80277c872757afa2d0f0e23251dd13f /ctdb/server | |
parent | 1596a3e84babb8fdd86af0c4b98906b309be7907 (diff) | |
download | samba-88f35cf86285b7a818282d5f465711de66dfad59.tar.gz |
ctdb-daemon: Drop unused prefix, logfn, logfn_private
These aren't set anywhere in the code.
Drop the log argument because it is also no longer used.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15090
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'ctdb/server')
-rw-r--r-- | ctdb/server/ctdb_logging.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/ctdb/server/ctdb_logging.c b/ctdb/server/ctdb_logging.c index 8af787c189f..6fcc0535ddd 100644 --- a/ctdb/server/ctdb_logging.c +++ b/ctdb/server/ctdb_logging.c @@ -38,12 +38,9 @@ #include "common/logging.h" struct ctdb_log_state { - const char *prefix; int fd, pfd; char buf[1024]; uint16_t buf_used; - void (*logfn)(const char *, uint16_t, void *); - void *logfn_private; }; /* Used by ctdb_set_child_logging() */ @@ -68,20 +65,10 @@ bool ctdb_logging_init(TALLOC_CTX *mem_ctx, const char *logging, return true; } -/* Note that do_debug always uses the global log state. */ -static void write_to_log(struct ctdb_log_state *log, - const char *buf, unsigned int len) +static void write_to_log(const char *buf, unsigned int len) { if (script_log_level <= DEBUGLEVEL) { - if (log != NULL && log->prefix != NULL) { - dbgtext("%s: %*.*s\n", log->prefix, len, len, buf); - } else { - dbgtext("%*.*s\n", len, len, buf); - } - /* log it in the eventsystem as well */ - if (log && log->logfn) { - log->logfn(log->buf, len, log->logfn_private); - } + dbgtext("%*.*s\n", len, len, buf); } } @@ -119,7 +106,7 @@ static void ctdb_child_log_handler(struct tevent_context *ev, if (n2 > 0 && log->buf[n2-1] == '\r') { n2--; } - write_to_log(log, log->buf, n2); + write_to_log(log->buf, n2); memmove(log->buf, p+1, sizeof(log->buf) - n1); log->buf_used -= n1; } @@ -127,7 +114,7 @@ static void ctdb_child_log_handler(struct tevent_context *ev, /* the buffer could have completely filled - unfortunately we have no choice but to dump it out straight away */ if (log->buf_used == sizeof(log->buf)) { - write_to_log(log, log->buf, log->buf_used); + write_to_log(log->buf, log->buf_used); log->buf_used = 0; } } |