From: Felix Fietkau Date: Mon, 6 Nov 2017 10:46:24 +0000 (+0100) Subject: logread: remove leftover debug code X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=960a29dc8c82009848b4970ee8d4c954fc8b7981;p=oweals%2Fubox.git logread: remove leftover debug code Signed-off-by: Felix Fietkau --- diff --git a/log/logread.c b/log/logread.c index 0cae75b..920d96b 100644 --- a/log/logread.c +++ b/log/logread.c @@ -103,7 +103,6 @@ static int log_notify(struct blob_attr *msg) char buf[512]; char buf_ts[32]; uint32_t p; - char *str; time_t t; uint32_t t_ms = 0; char *c, *m; @@ -145,7 +144,7 @@ static int log_notify(struct blob_attr *msg) c = ctime(&t); p = blobmsg_get_u32(tb[LOG_PRIO]); c[strlen(c) - 1] = '\0'; - str = blobmsg_format_json(msg, true); + if (log_type == LOG_NET) { int err; @@ -191,7 +190,6 @@ static int log_notify(struct blob_attr *msg) ret = write(sender.fd, buf, strlen(buf)); } - free(str); if (log_type == LOG_FILE) fsync(sender.fd);