Hi,

I've been working with Micah on fixing the patch, such that it compiles 
cleanly with syslog-ng-2.0.5-2

Regarding your questions:

>> +#define FMIN(a, b) (a) < (b) ? (a) : (b)
>
>Is there any difference between this macro and the MIN macro define in
>glib?
>(http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#MIN:CAPS)

Good point. Although, if you prefer to avoid the memcpy (see next points),the
macro isn't needed anyway.

>> +#define NEW_MSG_SIZE 2048
>
>Is there a reason to limit new message size to 2048 bytes?

(snip)

>Why do You not use GString and g_string_append_len?

I think these two questions are related. Since I'm not the original
developer, I really don't know the motivation, but I guess the use of an
array of fixed size, together with memcpy, was for efficiency
reasons. Syslog-ng seems to have a (configurable) default of 8192 bytes, 
but since many syslogs only accept 1024, I suppose most applications 
don't ever send more than 1024 bytes.

>> +  g_string_erase(&(log->msg), 0, -1);
>
>I think g_string_truncate is faster and explain more the intended
>feature (to me). 

No problem.

I've attached a new patch that uses GString and g_string_append_len
(and also g_string_truncate in place of g_string_erase).

regards,
rainer

Attachment: syslog-ng-anon-2.0.5.diff.3
Description: Binary data

Attachment: pgpH87nLn4OpV.pgp
Description: PGP signature

Reply via email to