diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-04-21 14:27:41 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-04-21 14:27:41 +0200 |
commit | 13ecf8a6ef5a5b69819865a2b9b524d4c561f5de (patch) | |
tree | 9de0040d5d4af84c980c19b0aa64de7551b063e8 /runtime/modules.c | |
parent | 82fa17ae5621849790eb39ed046d58333ede347c (diff) | |
download | rsyslog-13ecf8a6ef5a5b69819865a2b9b524d4c561f5de.tar.gz rsyslog-13ecf8a6ef5a5b69819865a2b9b524d4c561f5de.tar.xz rsyslog-13ecf8a6ef5a5b69819865a2b9b524d4c561f5de.zip |
step: config handler setting from syslogd.c moved to rsconf.c
Diffstat (limited to 'runtime/modules.c')
-rw-r--r-- | runtime/modules.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/modules.c b/runtime/modules.c index 8ede134b..7389909d 100644 --- a/runtime/modules.c +++ b/runtime/modules.c @@ -55,6 +55,7 @@ #endif #include "cfsysline.h" +#include "rsconf.h" #include "modules.h" #include "errmsg.h" #include "parser.h" @@ -80,9 +81,7 @@ static modInfo_t *pLoadedModulesLast = NULL; /* tail-pointer */ /* already dlopen()-ed libs */ static struct dlhandle_s *pHandles = NULL; -/* config settings */ -uchar *pModDir = NULL; /* read-only after startup */ - +static uchar *pModDir; /* directory where loadable modules are found */ /* we provide a set of dummy functions for modules that do not support the * some interfaces. @@ -801,7 +800,8 @@ Load(uchar *pModName) pModInfo = GetNxt(pModInfo); } - pModDirCurr = (uchar *)((pModDir == NULL) ? _PATH_MODDIR : (char *)pModDir); + pModDirCurr = (uchar *)((pModDir == NULL) ? + _PATH_MODDIR : (char *)pModDir); pModDirNext = NULL; pModHdlr = NULL; iLoadCnt = 0; @@ -1013,6 +1013,7 @@ CODESTARTObjClassExit(module) * TODO: add again: pthread_mutex_destroy(&mutLoadUnload); */ + free(pModDir); # ifdef DEBUG modUsrPrintAll(); /* debug aid - TODO: integrate with debug.c, at least the settings! */ # endif |