summaryrefslogtreecommitdiff
path: root/tools/omfwd.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-11-16 17:43:41 +0100
committerMichael Biebl <biebl@debian.org>2012-11-16 17:43:41 +0100
commit792f31fe29bef0c9960d3951f266fc7b2c70a2fc (patch)
treee82d85662e0ba5fc7e4ed0838011ea2a0ac0b44b /tools/omfwd.c
parent05bd88b115965e17631a4af10c84d71622fe4e3d (diff)
downloadrsyslog-792f31fe29bef0c9960d3951f266fc7b2c70a2fc.tar.gz
Imported Upstream version 7.2.2upstream/7.2.2
Diffstat (limited to 'tools/omfwd.c')
-rw-r--r--tools/omfwd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/omfwd.c b/tools/omfwd.c
index 2fd24bd..129392d 100644
--- a/tools/omfwd.c
+++ b/tools/omfwd.c
@@ -138,6 +138,7 @@ static struct cnfparamdescr actpdescr[] = {
{ "streamdriverauthmode", eCmdHdlrGetWord, 0 },
{ "streamdriverpermittedpeers", eCmdHdlrGetWord, 0 },
{ "resendlastmsgonreconnect", eCmdHdlrBinary, 0 },
+ { "template", eCmdHdlrGetWord, 0 },
};
static struct cnfparamblk actpblk =
{ CNFPARAMBLK_VERSION,
@@ -760,6 +761,7 @@ setInstParamDefaults(instanceData *pData)
BEGINnewActInst
struct cnfparamvals *pvals;
+ uchar *tplToUse;
int i;
rsRetVal localRet;
CODESTARTnewActInst
@@ -881,7 +883,8 @@ CODESTARTnewActInst
}
CODE_STD_STRING_REQUESTnewActInst(1)
- CHKiRet(OMSRsetEntry(*ppOMSR, 0, ustrdup(getDfltTpl()), OMSR_NO_RQD_TPL_OPTS));
+ tplToUse = ustrdup((pData->tplName == NULL) ? getDfltTpl() : pData->tplName);
+ CHKiRet(OMSRsetEntry(*ppOMSR, 0, tplToUse, OMSR_NO_RQD_TPL_OPTS));
CHKiRet(initTCP(pData));
CODE_STD_FINALIZERnewActInst