diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 18:48:40 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 18:48:40 +0100 |
commit | b41e0d51f54a89f489bbf1c1bf5f85d576ae4049 (patch) | |
tree | 9c6b7b1103c70f27818180bb586095c6f9f05173 | |
parent | b1db196953713dd09c499a3edf81347bd903c19e (diff) | |
download | rsyslog-b41e0d51f54a89f489bbf1c1bf5f85d576ae4049.tar.gz rsyslog-b41e0d51f54a89f489bbf1c1bf5f85d576ae4049.tar.xz rsyslog-b41e0d51f54a89f489bbf1c1bf5f85d576ae4049.zip |
some more cleanup along the way
... getting the module structure a bit cleaner ;)
-rw-r--r-- | dirty.h | 1 | ||||
-rw-r--r-- | runtime/rule.c | 30 | ||||
-rw-r--r-- | tests/runtime-dummy.c | 1 | ||||
-rw-r--r-- | tools/syslogd.c | 30 |
4 files changed, 30 insertions, 32 deletions
@@ -32,7 +32,6 @@ rsRetVal submitMsg(msg_t *pMsg); rsRetVal logmsgInternal(int iErr, int pri, uchar *msg, int flags); rsRetVal parseAndSubmitMessage(uchar *hname, uchar *hnameIP, uchar *msg, int len, int flags, flowControl_t flowCtlTypeu, prop_t *pInputName, struct syslogTime *stTime, time_t ttGenTime); rsRetVal diagGetMainMsgQSize(int *piSize); /* for imdiag */ -char* getFIOPName(unsigned iFIOP); rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName); /* Intervals at which we flush out "message repeated" messages, diff --git a/runtime/rule.c b/runtime/rule.c index fe2cf432..ae0da0d6 100644 --- a/runtime/rule.c +++ b/runtime/rule.c @@ -40,7 +40,6 @@ #include "var.h" #include "srUtils.h" #include "unicode-helper.h" -#include "dirty.h" /* for getFIOPName */ /* static data */ DEFobjStaticHelpers @@ -49,6 +48,35 @@ DEFobjCurrIf(expr) DEFobjCurrIf(var) DEFobjCurrIf(vm) + +/* support for simple textual representation of FIOP names + * rgerhards, 2005-09-27 + */ +static char* +getFIOPName(unsigned iFIOP) +{ + char *pRet; + switch(iFIOP) { + case FIOP_CONTAINS: + pRet = "contains"; + break; + case FIOP_ISEQUAL: + pRet = "isequal"; + break; + case FIOP_STARTSWITH: + pRet = "startswith"; + break; + case FIOP_REGEX: + pRet = "regex"; + break; + default: + pRet = "NOP"; + break; + } + return pRet; +} + + /* iterate over all actions, this is often needed, for example when HUP processing * must be done or a shutdown is pending. */ diff --git a/tests/runtime-dummy.c b/tests/runtime-dummy.c index 24431040..5a9039bf 100644 --- a/tests/runtime-dummy.c +++ b/tests/runtime-dummy.c @@ -40,7 +40,6 @@ void cflineClassic(void) {}; void selectorAddList(void) {}; void selectorConstruct(void) {}; void selectorDestruct(void) {}; -void getFIOPName(void) {}; rsRetVal createMainQueue(void) { return RS_RET_ERR; } ruleset_t *pCurrRuleset; diff --git a/tools/syslogd.c b/tools/syslogd.c index 3fb54467..aeab292c 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -286,34 +286,6 @@ static int iMainMsgQueueDeqtWinFromHr = 0; /* hour begin of time frame when qu static int iMainMsgQueueDeqtWinToHr = 25; /* hour begin of time frame when queue is to be dequeued */ -/* support for simple textual representation of FIOP names - * rgerhards, 2005-09-27 - */ -char* -getFIOPName(unsigned iFIOP) -{ - char *pRet; - switch(iFIOP) { - case FIOP_CONTAINS: - pRet = "contains"; - break; - case FIOP_ISEQUAL: - pRet = "isequal"; - break; - case FIOP_STARTSWITH: - pRet = "startswith"; - break; - case FIOP_REGEX: - pRet = "regex"; - break; - default: - pRet = "NOP"; - break; - } - return pRet; -} - - /* Reset config variables to default values. * rgerhards, 2007-07-17 */ @@ -382,7 +354,7 @@ static int usage(void) fprintf(stderr, "usage: rsyslogd [-c<version>] [-46AdnqQvwx] [-l<hostlist>] [-s<domainlist>]\n" " [-f<conffile>] [-i<pidfile>] [-N<level>] [-M<module load path>]\n" " [-u<number>]\n" - "To run rsyslogd in native mode, use \"rsyslogd -c3 <other options>\"\n\n" + "To run rsyslogd in native mode, use \"rsyslogd -c5 <other options>\"\n\n" "For further information see http://www.rsyslog.com/doc\n"); exit(1); /* "good" exit - done to terminate usage() */ } |