[syslog-ng]$MSG contains $PROGRAM

Loic Minier syslog-ng@lists.balabit.hu
Wed, 14 Apr 2004 17:09:37 +0200


--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

   Hey,

 When expanding the template macro $MSG, it will result in "program:
 message" when a program part is present.  I think this shouldn't be.

 It is easy to fix with attached patch (remove a couple of lines at the
 end of parse_msg in log.c).

   Regards,

-- 
Loïc Minier <lool@dooz.org>

--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="log.c.patch"

--- src/log.c	2004-01-13 19:08:02.000000000 +0100
+++ src/log.c.new	2004-04-14 17:07:22.000000000 +0200
@@ -255,8 +255,6 @@
 			if (left) {
 				lm->program = c_format_cstring("%s", oldleft - left, oldsrc);
 			}
-			left = oldleft;
-			src = oldsrc;
 		}
 		lm->stamp = now;
 	}

--UlVJffcvxoiEqYs2--