diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-13 18:11:02 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-13 18:11:02 +0100 |
commit | 824b8c5d45771dd27693c33da54db709b8e6207a (patch) | |
tree | cabb6d32687521800649623c56f745d9e3afd753 /action.c | |
parent | e97b65ca17e5285d31c7e1b807ac5e17eb395174 (diff) | |
download | rsyslog-824b8c5d45771dd27693c33da54db709b8e6207a.tar.gz rsyslog-824b8c5d45771dd27693c33da54db709b8e6207a.tar.bz2 rsyslog-824b8c5d45771dd27693c33da54db709b8e6207a.zip |
regression fix: failure if more than one template was to process
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -831,11 +831,15 @@ prepareDoActionParams(action_t *pAction, wti_t *pWti, msg_t *pMsg, struct syslog DEFiRet; pWrkrInfo = &(pWti->actWrkrInfo[pAction->iActionNbr]); + if(pAction->eParamPassing == ACT_STRING_PASSING) { + CHKiRet(wtiNewIParam(pWti, pAction, &iparams)); + } + /* here we must loop to process all requested strings */ for(i = 0 ; i < pAction->iNumTpls ; ++i) { +dbgprintf("DDDDD: generating template #%d\n", i); switch(pAction->eParamPassing) { case ACT_STRING_PASSING: - CHKiRet(wtiNewIParam(pWti, pAction, &iparams)); iparams->msgFlags = pMsg->msgFlags; CHKiRet(tplToString(pAction->ppTpl[i], pMsg, &(iparams->staticActStrings[i]), &iparams->staticLenStrings[i], ttNow)); @@ -856,6 +860,7 @@ prepareDoActionParams(action_t *pAction, wti_t *pWti, msg_t *pMsg, struct syslog assert(0); /* software bug if this happens! */ break; } +dbgprintf("DDDDD: template #%d is: '%s'\n", i, iparams->staticActStrings[i]); } finalize_it: |