diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-03 16:25:47 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-03 16:25:47 +0000 |
commit | 64de2f0d2e0dd61dc9703a4ffd62f41f5cf42caa (patch) | |
tree | aee99a4bc9c47762790c088b20e1b4b2b7350c9f | |
parent | 02c00910c3dbd94ab424d668727e3a7a2afd9378 (diff) | |
download | rsyslog-64de2f0d2e0dd61dc9703a4ffd62f41f5cf42caa.tar.gz rsyslog-64de2f0d2e0dd61dc9703a4ffd62f41f5cf42caa.tar.xz rsyslog-64de2f0d2e0dd61dc9703a4ffd62f41f5cf42caa.zip |
added $MainMsgQueueFilePrefix config parameter
-rw-r--r-- | syslogd.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -384,6 +384,7 @@ static int logEveryMsg = 0;/* no repeat message processing - read-only after st * 1 - do NOT suppress duplicate messages */ uchar *pszSpoolDirectory = NULL;/* name of rsyslog's spool directory (without trailing slash) */ +uchar *pszMainMsgQFilePrefix = NULL;/* prefix for the main message queue file */ /* end global config file state variables */ static unsigned int Forwarding = 0; @@ -509,8 +510,12 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a pModDir = NULL; } if(pszSpoolDirectory != NULL) { - free(pModDir); - pModDir = NULL; + free(pszSpoolDirectory); + pszSpoolDirectory = NULL; + } + if(pszMainMsgQFilePrefix != NULL) { + free(pszMainMsgQFilePrefix); + pszMainMsgQFilePrefix = NULL; } iMainMsgQueueSize = 10000; MainMsgQueType = QUEUETYPE_FIXED_ARRAY; @@ -4472,6 +4477,7 @@ static rsRetVal loadBuildInModules(void) * This, I think, is the right thing to do. -- rgerhards, 2007-07-31 */ CHKiRet(regCfSysLineHdlr((uchar *)"spooldirectory", 0, eCmdHdlrGetWord, NULL, &pszSpoolDirectory, NULL)); + CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuefileprefix", 0, eCmdHdlrGetWord, NULL, &pszMainMsgQFilePrefix, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuesize", 0, eCmdHdlrInt, NULL, &iMainMsgQueueSize, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"mainmsgqueuetype", 0, eCmdHdlrGetWord, setMainMsgQueType, NULL, NULL)); CHKiRet(regCfSysLineHdlr((uchar *)"repeatedmsgreduction", 0, eCmdHdlrBinary, NULL, &bReduceRepeatMsgs, NULL)); |