diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-06-02 11:50:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-06-02 11:50:15 +0200 |
commit | 7f0c927623b6425fee2c39b2d5207d7c36e32acd (patch) | |
tree | 0ce7208451e93b50d74e923376490b18379b8608 /tools/omfile.c | |
parent | 715b9fe052f5a7c622a1f71f905461e06e398de8 (diff) | |
download | rsyslog-7f0c927623b6425fee2c39b2d5207d7c36e32acd.tar.gz rsyslog-7f0c927623b6425fee2c39b2d5207d7c36e32acd.tar.xz rsyslog-7f0c927623b6425fee2c39b2d5207d7c36e32acd.zip |
bugfix: $ActionFileDefaultTemplate did not work
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=262
Diffstat (limited to 'tools/omfile.c')
-rw-r--r-- | tools/omfile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/omfile.c b/tools/omfile.c index 8526cb74..eb9933cd 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -177,15 +177,15 @@ typedef struct configSettings_s { int64 iIOBufSize; /* size of an io buffer */ int iFlushInterval; /* how often flush the output buffer on inactivity? */ int bUseAsyncWriter; /* should we enable asynchronous writing? */ - uchar *pszFileDfltTplName; /* name of the default template to use */ EMPTY_STRUCT } configSettings_t; +uchar *pszFileDfltTplName; /* name of the default template to use */ SCOPING_SUPPORT; /* must be set AFTER configSettings_t is defined */ BEGINinitConfVars /* (re)set config variables to default values */ CODESTARTinitConfVars - cs.pszFileDfltTplName = NULL; /* make sure this can be free'ed! */ + pszFileDfltTplName = NULL; /* make sure this can be free'ed! */ iRet = resetConfigVariables(NULL, NULL); /* params are dummies */ ENDinitConfVars @@ -849,8 +849,8 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a cs.iIOBufSize = IOBUF_DFLT_SIZE; cs.iFlushInterval = FLUSH_INTRVL_DFLT; cs.bUseAsyncWriter = USE_ASYNCWRITER_DFLT; - free(cs.pszFileDfltTplName); - cs.pszFileDfltTplName = NULL; + free(pszFileDfltTplName); + pszFileDfltTplName = NULL; return RS_RET_OK; } @@ -914,7 +914,7 @@ SCOPINGmodInit CHKiRet(omsdRegCFSLineHdlr((uchar *)"failonchownfailure", 0, eCmdHdlrBinary, NULL, &cs.bFailOnChown, STD_LOADABLE_MODULE_ID, eConfObjAction)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"omfileForceChown", 0, eCmdHdlrBinary, NULL, &cs.bForceChown, STD_LOADABLE_MODULE_ID, eConfObjAction)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"actionfileenablesync", 0, eCmdHdlrBinary, NULL, &cs.bEnableSync, STD_LOADABLE_MODULE_ID, eConfObjAction)); - CHKiRet(regCfSysLineHdlr((uchar *)"actionfiledefaulttemplate", 0, eCmdHdlrGetWord, NULL, &cs.pszFileDfltTplName, NULL, eConfObjAction)); + CHKiRet(regCfSysLineHdlr((uchar *)"actionfiledefaulttemplate", 0, eCmdHdlrGetWord, NULL, &pszFileDfltTplName, NULL, eConfObjGlobal)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID, eConfObjAction)); ENDmodInit /* vi:set ai: |