From 67aebe1d0f21de2426110eae69d36e8be1e792ef Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 19 Sep 2012 14:49:57 +0200 Subject: bugfix: omfile action did not respect "template" parameter ... and used default template in all cases --- tools/omfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/omfile.c') diff --git a/tools/omfile.c b/tools/omfile.c index 1a36343f..1ccd4a56 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -885,6 +885,7 @@ setInstParamDefaults(instanceData *pData) BEGINnewActInst struct cnfparamvals *pvals; + uchar *tplToUse; int i; CODESTARTnewActInst DBGPRINTF("newActInst (omfile)\n"); @@ -959,7 +960,8 @@ CODESTARTnewActInst ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS); } - CHKiRet(OMSRsetEntry(*ppOMSR, 0, ustrdup(getDfltTpl()), OMSR_NO_RQD_TPL_OPTS)); + tplToUse = (pData->tplName == NULL) ? ustrdup(getDfltTpl()) : pData->tplName; + CHKiRet(OMSRsetEntry(*ppOMSR, 0, tplToUse, OMSR_NO_RQD_TPL_OPTS)); if(pData->bDynamicName) { /* "filename" is actually a template name, we need this as string 1. So let's add it -- cgit v1.2.3