summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-11-29 12:36:42 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-11-29 12:36:42 +0100
commitcea19ee31a5e9b9e0efca46686a9ddc9b6202298 (patch)
tree786da407973ddbb1571d6cd1b02f8a431807d0cd
parent1e39f3dd0158944820a0676aac593ba0bcc5819b (diff)
parent0f795af5912b4554b70e3d1388a64a49ef2e37fe (diff)
downloadrsyslog-cea19ee31a5e9b9e0efca46686a9ddc9b6202298.tar.gz
rsyslog-cea19ee31a5e9b9e0efca46686a9ddc9b6202298.tar.bz2
rsyslog-cea19ee31a5e9b9e0efca46686a9ddc9b6202298.zip
Merge branch 'v7-stable'
-rw-r--r--ChangeLog1
-rw-r--r--template.c9
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5926f208..b7d59c84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -99,6 +99,7 @@ Version 7.2.4 [v7-stable] 2012-10-??
the to-be-expected "module does not support new style" error message.
That invalid error message could be quite misleading and actually stop
people from addressing the real problem (aka "go nuts" ;))
+- bugfix: template "type" parameter is mandatory (but was not)
----------------------------------------------------------------------------
Version 7.2.3 [v7-stable] 2012-10-21
- regression fix: rsyslogd terminated when wild-card $IncludeConfig did not
diff --git a/template.c b/template.c
index 87d7f463..015d2c04 100644
--- a/template.c
+++ b/template.c
@@ -55,7 +55,7 @@ DEFobjCurrIf(strgen)
/* tables for interfacing with the v6 config system */
static struct cnfparamdescr cnfparamdescr[] = {
{ "name", eCmdHdlrString, 1 },
- { "type", eCmdHdlrString, 0 },
+ { "type", eCmdHdlrString, 1 },
{ "string", eCmdHdlrString, 0 },
{ "plugin", eCmdHdlrString, 0 },
{ "subtree", eCmdHdlrString, 0 },
@@ -1330,7 +1330,7 @@ static rsRetVal
createConstantTpe(struct template *pTpl, struct cnfobj *o)
{
struct templateEntry *pTpe;
- es_str_t *value;
+ es_str_t *value = NULL; /* init just to keep compiler happy - mandatory parameter */
int i;
struct cnfparamvals *pvals = NULL;
uchar *outname = NULL;
@@ -1716,13 +1716,14 @@ tplProcessCnf(struct cnfobj *o)
{
struct template *pTpl = NULL;
struct cnfparamvals *pvals = NULL;
- int lenName;
+ int lenName = 0; /* init just to keep compiler happy: mandatory parameter */
char *name = NULL;
uchar *tplStr = NULL;
uchar *plugin = NULL;
es_str_t *subtree = NULL;
uchar *p;
- enum { T_STRING, T_PLUGIN, T_LIST, T_SUBTREE } tplType;
+ enum { T_STRING, T_PLUGIN, T_LIST, T_SUBTREE }
+ tplType = T_STRING; /* init just to keep compiler happy: mandatory parameter */
int i;
int o_sql=0, o_stdsql=0, o_json=0; /* options */
int numopts;