[syslog-ng]Syslog-ng 1.6.4 adds ^@ to each line
syslog-ng@lists.balabit.hu
syslog-ng@lists.balabit.hu
Fri, 4 Jun 2004 17:18:33 +0200
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