summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/omprog/omprog.c12
-rw-r--r--tools/ompipe.c6
2 files changed, 8 insertions, 10 deletions
diff --git a/plugins/omprog/omprog.c b/plugins/omprog/omprog.c
index 7a6ef056..940ef8d7 100644
--- a/plugins/omprog/omprog.c
+++ b/plugins/omprog/omprog.c
@@ -441,15 +441,9 @@ CODESTARTnewActInst
}
}
- if(pData->tplName == NULL) {
- CHKiRet(OMSRsetEntry(*ppOMSR, 0, (uchar*) strdup("RSYSLOG_FileFormat"),
- OMSR_NO_RQD_TPL_OPTS));
- } else {
- CHKiRet(OMSRsetEntry(*ppOMSR, 0,
- (uchar*) strdup((char*) pData->tplName),
- OMSR_NO_RQD_TPL_OPTS));
- }
-
+ CHKiRet(OMSRsetEntry(*ppOMSR, 0, (uchar*)strdup((pData->tplName == NULL) ?
+ "RSYSLOG_FileFormat" : (char*)pData->tplName),
+ OMSR_NO_RQD_TPL_OPTS));
CODE_STD_FINALIZERnewActInst
cnfparamvalsDestruct(pvals, &actpblk);
ENDnewActInst
diff --git a/tools/ompipe.c b/tools/ompipe.c
index 420e2b11..df8066b1 100644
--- a/tools/ompipe.c
+++ b/tools/ompipe.c
@@ -329,6 +329,10 @@ CODESTARTnewActInst
}
}
+ CHKiRet(OMSRsetEntry(*ppOMSR, 0, (uchar*)strdup((pData->tplName == NULL) ?
+ "RSYSLOG_ForwardFormat" : (char*)pData->tplName),
+ OMSR_NO_RQD_TPL_OPTS));
+ /* Old flawed template code
if(pData->tplName == NULL) {
CHKiRet(OMSRsetEntry(*ppOMSR, 0, (uchar*) "RSYSLOG_FileFormat",
OMSR_NO_RQD_TPL_OPTS));
@@ -336,7 +340,7 @@ CODESTARTnewActInst
CHKiRet(OMSRsetEntry(*ppOMSR, 0,
(uchar*) strdup((char*) pData->tplName),
OMSR_NO_RQD_TPL_OPTS));
- }
+ }*/
CODE_STD_FINALIZERnewActInst
cnfparamvalsDestruct(pvals, &actpblk);
ENDnewActInst