RE: [syslog-ng]Syslog-ng 1.6.4 adds ^@ to each line
Hi, now I have it. RTFM :D I forgot to touch a new sources.c.x Many thx @all specially to Bazsi for coding. Does this fix stay in the new releases or do I have to apply the fix evertime I update my syslog-ng? regards, Benjamin michihito matsubara wrote:
Hi.
i've been watching for this thread because of my old YAMAHA ISDN router has same output as well as Benjamin's.
On Fri, 4 Jun 2004 14:45:15 +0200 Subject: RE: [syslog-ng]Syslog-ng 1.6.4 adds ^@ to each line Benjamin.Zoeller@salt-solutions.de wrote:
Sorry I can't compile this. Get the following error.
Done againt syslog-ng-1.6.4+20040604 and gotya. on Linux, gcc-3.3.2, glibc-2.3.1, libnet-1.1.1. Now, there is no ^@ code at each end of lines. Works very fine.
Can you check if this patch works? (it fixed the problem for me)
diff -u -r1.37.4.2 sources.c --- src/sources.c 10 Mar 2004 18:43:28 -0000 1.37.4.2 +++ src/sources.c 4 Jun 2004 12:28:26 -0000 @@ -120,6 +120,13 @@ full or we are a datagram receiver, when the message is in its own packet. */ + if (closure->dgram) { + /* strip one trailing LF or NUL character */ + if (closure->pos > 0 && + (closure->buffer[closure->pos - 1] == '\n' || + closure->buffer[closure->pos - 1] == '\0')) + closure->pos--; + } do_handle_line(closure, closure->pos, closure->buffer, salen ? (abstract_addr *) &sabuf : NULL, salen); closure->pos = 0; return ST_OK | ST_GOON;
Benjamin,
looks like you missed something for the patch. double check and try again. you can make it, too. This patch is nothing but a clean and simple.
regards, mitch
2004-06-04, p keltezéssel 17:18-kor Benjamin.Zoeller@salt-solutions.de ezt írta:
Hi, now I have it. RTFM :D I forgot to touch a new sources.c.x
Many thx @all specially to Bazsi for coding.
Does this fix stay in the new releases or do I have to apply the fix evertime I update my syslog-ng?
I've committed the patch to my CVS tree, the next release will contain it. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (2)
-
Balazs Scheidler
-
Benjamin.Zoeller@salt-solutions.de