From c135ef6de2355c9b1c9f69a1df41871e55f55cda Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 31 Jul 2007 07:51:43 +0000 Subject: - moved the SetCCEscapeCharacter config file directive to cfsysline.c and also generalized it for further use while doing so --- syslogd.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index 65528ea6..6865a026 100644 --- a/syslogd.c +++ b/syslogd.c @@ -3511,28 +3511,6 @@ static void doModLoad(uchar **pp) skipWhiteSpace(pp); /* skip over any whitespace */ } - -/* parse the control character escape prefix and store it. - * added 2007-07-17 by rgerhards - */ -static void doControlCharEscPrefix(uchar **pp) -{ - assert(pp != NULL); - assert(*pp != NULL); - - skipWhiteSpace(pp); /* skip over any whitespace */ - - /* if we are not at a '\0', we have our new char - no validity checks here... */ - if(**pp == '\0') { - logerror("No Control Character Prefix Character given - ignoring directive"); - } else { - cCCEscapeChar = **pp; - ++(*pp); /* eat processed char */ - } - - skipWhiteSpace(pp); /* skip over any whitespace */ -} - /* parse and interpret a $-config line that starts with * a name (this is common code). It is parsed to the name * and then the proper sub-function is called to handle @@ -3647,7 +3625,7 @@ void cfsysline(uchar *p) } else if(!strcasecmp((char*) szCmd, "repeatedmsgreduction")) { doBinaryOptionLine(&p, NULL, &bReduceRepeatMsgs); } else if(!strcasecmp((char*) szCmd, "controlcharacterescapeprefix")) { - doControlCharEscPrefix(&p); + doGetChar(&p, NULL, &cCCEscapeChar); } else if(!strcasecmp((char*) szCmd, "escapecontrolcharactersonreceive")) { doBinaryOptionLine(&p, NULL, &bEscapeCCOnRcv); } else if(!strcasecmp((char*) szCmd, "dropmsgswithmaliciousdnsptrrecords")) { -- cgit