thank you, merged in r42572
On 16/09/2014 10:53, Бельков Максим wrote: > From: Belkov Max <belkov-...@mail.ru> > > When logread daemon send a syslog message to another host, time, severity > and facility are cut off. > The message contains only text. > This path adds time, severity and facility in the message as described in > the RFC 3164. > Signed-off-by: Belkov Max <belkov-...@mail.ru> > --- > Patched one file: logread.c > This patch been tested and work well. > > --- /home/max/openwrt/l/log/logread.c.old 2014-09-15 > 03:03:50.000000000 +0400 > +++ /home/max/openwrt/l/log/logread.c 2014-09-16 12:04:44.388950951 +0400 > @@ -135,9 +135,14 @@ static int log_notify(struct blob_attr * > if (log_type == LOG_NET) { > int err; > > - *buf = '\0'; > - if (hostname) > - snprintf(buf, sizeof(buf), "%s ", hostname); > + snprintf(buf, sizeof(buf), "<%u>", p); > + /* extract syslog time from "Wed Jun 30 21:49:08 1993" and > obtain > + "Jun 30 21:49:08 " according RFC 3164 */ > + strncat(buf, c + 4, 16); > + if (hostname) { > + strncat(buf, hostname, sizeof(buf)); > + strncat(buf, " ", sizeof(buf)); > + } > if (log_prefix) { > strncat(buf, log_prefix, sizeof(buf)); > strncat(buf, ": ", sizeof(buf)); _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel