diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2013-07-24 14:53:54 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2013-07-24 14:53:54 +0200 |
commit | c05e0e76e8ab6fb61d854902662be4ae067d7838 (patch) | |
tree | 0e9b30c422a9d80e21258522c4eb949fd0024678 | |
parent | ea599342db0e119245f8cb60c68b8ab1dd826cc5 (diff) | |
download | rsyslog-c05e0e76e8ab6fb61d854902662be4ae067d7838.tar.gz rsyslog-c05e0e76e8ab6fb61d854902662be4ae067d7838.tar.bz2 rsyslog-c05e0e76e8ab6fb61d854902662be4ae067d7838.zip |
Another fix for bugid# 468
Using OMSRsetEntry now to set the default action template when using new-style config.
See here for more: http://bugzilla.adiscon.com/show_bug.cgi?id=468
-rw-r--r-- | plugins/omsnmp/omsnmp.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/omsnmp/omsnmp.c b/plugins/omsnmp/omsnmp.c index 5fa98515..8ad424e6 100644 --- a/plugins/omsnmp/omsnmp.c +++ b/plugins/omsnmp/omsnmp.c @@ -429,14 +429,10 @@ CODESTARTnewActInst } } - if(pData->tplName == NULL) { - CHKiRet(OMSRsetEntry(*ppOMSR, 0, (uchar*) "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_ForwardFormat" : (char*)pData->tplName), + OMSR_NO_RQD_TPL_OPTS)); + CODE_STD_FINALIZERnewActInst cnfparamvalsDestruct(pvals, &actpblk); ENDnewActInst |