summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2013-07-24 15:05:23 +0200
committerAndre Lorbach <alorbach@adiscon.com>2013-07-24 15:05:23 +0200
commit32ea9f6e0f8e5b301e173d7d06c81c2b80925c1d (patch)
tree80206343c8ca0fa54b6d35a04bd3485d21d2da35
parent96ecc8bff7dab0043ec1ebec4c44a682bed02ca8 (diff)
parentc05e0e76e8ab6fb61d854902662be4ae067d7838 (diff)
downloadrsyslog-32ea9f6e0f8e5b301e173d7d06c81c2b80925c1d.tar.gz
rsyslog-32ea9f6e0f8e5b301e173d7d06c81c2b80925c1d.tar.bz2
rsyslog-32ea9f6e0f8e5b301e173d7d06c81c2b80925c1d.zip
Merge branch 'v7-stable'
-rw-r--r--plugins/omsnmp/omsnmp.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/plugins/omsnmp/omsnmp.c b/plugins/omsnmp/omsnmp.c
index 79e555b3..8ad424e6 100644
--- a/plugins/omsnmp/omsnmp.c
+++ b/plugins/omsnmp/omsnmp.c
@@ -112,15 +112,15 @@ static configSettings_t cs;
/* action (instance) parameters */
static struct cnfparamdescr actpdescr[] = {
{ "server", eCmdHdlrString, CNFPARAM_REQUIRED },
- { "port", eCmdHdlrInt, CNFPARAM_REQUIRED },
- { "transport", eCmdHdlrString, CNFPARAM_REQUIRED },
- { "version", eCmdHdlrInt, CNFPARAM_REQUIRED },
- { "community", eCmdHdlrString, CNFPARAM_REQUIRED },
- { "enterpriseoid", eCmdHdlrString, CNFPARAM_REQUIRED },
- { "trapoid", eCmdHdlrString, CNFPARAM_REQUIRED },
- { "messageoid", eCmdHdlrString, CNFPARAM_REQUIRED },
- { "traptype", eCmdHdlrInt, CNFPARAM_REQUIRED },
- { "specifictype", eCmdHdlrInt, CNFPARAM_REQUIRED },
+ { "port", eCmdHdlrInt, 0 },
+ { "transport", eCmdHdlrString, 0 },
+ { "version", eCmdHdlrInt, 0 },
+ { "community", eCmdHdlrString, 0 },
+ { "enterpriseoid", eCmdHdlrString, 0 },
+ { "trapoid", eCmdHdlrString, 0 },
+ { "messageoid", eCmdHdlrString, 0 },
+ { "traptype", eCmdHdlrInt, 0 },
+ { "specifictype", eCmdHdlrInt, 0 },
{ "template", eCmdHdlrGetWord, 0 }
};
static struct cnfparamblk actpblk =
@@ -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