summaryrefslogtreecommitdiff
path: root/template.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-12-07 15:57:10 +0100
committerMichael Biebl <biebl@debian.org>2012-12-07 15:57:10 +0100
commited0fad5385d95f30f7073bf3013e4ecabc4b29e4 (patch)
tree7445e112c605e9bbe04c70bf347fb4587a459d4b /template.c
parent1796f8e02b6d0bc29ab65427d2ebf97f82f41999 (diff)
downloadrsyslog-ed0fad5385d95f30f7073bf3013e4ecabc4b29e4.tar.gz
Imported Upstream version 7.2.4upstream/7.2.4
Diffstat (limited to 'template.c')
-rw-r--r--template.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/template.c b/template.c
index 1b8b218..8427e85 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 },
@@ -1300,7 +1300,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;
@@ -1669,13 +1669,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;
@@ -2066,8 +2067,14 @@ void tplPrintList(rsconf_t *conf)
case tplFmtUnixDate:
dbgprintf("[Format as Unix timestamp] ");
break;
+ case tplFmtSecFrac:
+ dbgprintf("[fractional seconds, only] ");
+ break;
+ case tplFmtRFC3164BuggyDate:
+ dbgprintf("[Format as buggy RFC3164-Date] ");
+ break;
default:
- dbgprintf("[INVALID eDateFormat %d] ", pTpe->data.field.eDateFormat);
+ dbgprintf("[UNKNOWN eDateFormat %d] ", pTpe->data.field.eDateFormat);
}
switch(pTpe->data.field.eCaseConv) {
case tplCaseConvNo: