summaryrefslogtreecommitdiffstats
path: root/tools/ompipe.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-01 07:33:09 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-01 07:33:09 +0100
commit2c39f76037328459c5cff14762e0839b1e77d570 (patch)
tree73916a3373e27b3ce8d474348a9d9bdb304165f1 /tools/ompipe.c
parentf12a1995e42d098217fef22cba6e7158ed76e635 (diff)
downloadrsyslog-2c39f76037328459c5cff14762e0839b1e77d570.tar.gz
rsyslog-2c39f76037328459c5cff14762e0839b1e77d570.tar.xz
rsyslog-2c39f76037328459c5cff14762e0839b1e77d570.zip
make $ActonFileDefaultTemplate available to ompipe
This was not honored by the new ompipe module, because it is a local file directive (it was applied to pipes as a side-effect of using the same module for pipes and files...). I now made this a global, so that semantics are the same as previously. Not really nice, but probably the best thing to do in the current situation (everything else would involve much more overhead --- leave that for the new config system).
Diffstat (limited to 'tools/ompipe.c')
-rw-r--r--tools/ompipe.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/ompipe.c b/tools/ompipe.c
index 3355bcb4..5fb9b27e 100644
--- a/tools/ompipe.c
+++ b/tools/ompipe.c
@@ -46,6 +46,7 @@
#include "srUtils.h"
#include "template.h"
#include "ompipe.h"
+#include "omfile.h" /* for dirty trick: access to $ActionFileDefaultTemplate value */
#include "cfsysline.h"
#include "module-template.h"
#include "conf.h"
@@ -60,7 +61,6 @@ DEFobjCurrIf(errmsg)
/* globals for default values */
-static uchar *pszTplName = NULL; /* name of the default template to use */
/* end globals for default values */
@@ -192,7 +192,7 @@ CODESTARTparseSelectorAct
* and then look at the rest of the line.
*/
CHKiRet(cflineParseFileName(p, (uchar*) pData->f_fname, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS,
- (pszTplName == NULL) ? (uchar*)"RSYSLOG_FileFormat" : pszTplName));
+ (pszFileDfltTplName == NULL) ? (uchar*)"RSYSLOG_FileFormat" : pszFileDfltTplName));
/* at this stage, we ignore the return value of preparePipe, this is taken
* care of in later steps. -- rgerhards, 2009-03-19
@@ -219,8 +219,6 @@ ENDdoHUP
BEGINmodExit
CODESTARTmodExit
- if(pszTplName != NULL)
- free(pszTplName);
ENDmodExit