On Mon, 17 Jan 2011, Rainer Gerhards wrote:

David Lang wrote:
Rainer,
   I'm testing the cisconames parser, and I've almost got everything
working (it looks like a total of 2 bugs in the initial code I sent
you),
but I'm running into problems trying to truncate a string.

in the message parser, what would I pass to rsCStrTruncate() to tuncate
2
characters from the incomeing message?

I've just checked the code. It's the number of characters to truncate. So you
need to pass in "2".

Code in question:
http://git.adiscon.com/?p=rsyslog.git;a=blob;f=runtime/stringbuf.c;h=f4a9caae
d62d7ad9bca0deaf4728298cc40b5c2d;hb=HEAD#l435

the problem I'm having is figuring out what to use for the pointer to the string. so far everything I've tried is wrong and results in a segfault.

I'm assuming that the right answer is pMsg->something, but I haven't figured out what the something is.

David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to