diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-17 09:54:10 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-17 09:54:10 +0200 |
commit | 911101ed26292c766eae0b48575e5911b96d2ea7 (patch) | |
tree | 743d3dc673fbb29b734cd1f0f25d53a649e63ecf /plugins | |
parent | e16a207726dce038835cdc12a928a95b5b915440 (diff) | |
download | rsyslog-911101ed26292c766eae0b48575e5911b96d2ea7.tar.gz rsyslog-911101ed26292c766eae0b48575e5911b96d2ea7.tar.xz rsyslog-911101ed26292c766eae0b48575e5911b96d2ea7.zip |
moved "option_DisallowWarning" variable to global data pool
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imudp/imudp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 3103c4f8..e0f9f1d3 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -39,6 +39,7 @@ #include "module-template.h" #include "srUtils.h" #include "errmsg.h" +#include "glbl.h" MODULE_TYPE_INPUT @@ -47,6 +48,7 @@ MODULE_TYPE_INPUT /* Module static data */ DEF_IMOD_STATIC_DATA DEFobjCurrIf(errmsg) +DEFobjCurrIf(glbl) DEFobjCurrIf(net) static int *udpLstnSocks = NULL; /* Internet datagram sockets, first element is nbr of elements @@ -195,7 +197,7 @@ CODESTARTrunInput MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_NO_DELAY); } else { dbgprintf("%s is not an allowed sender\n", (char*)fromHostFQDN); - if(option_DisallowWarning) { + if(glbl.GetOption_DisallowWarning) { errmsg.LogError(NO_ERRCODE, "UDP message from disallowed sender %s discarded", (char*)fromHost); } @@ -253,6 +255,7 @@ BEGINmodExit CODESTARTmodExit /* release what we no longer need */ objRelease(errmsg, CORE_COMPONENT); + objRelease(glbl, CORE_COMPONENT); objRelease(net, LM_NET_FILENAME); ENDmodExit @@ -281,6 +284,7 @@ CODESTARTmodInit *ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(objUse(errmsg, CORE_COMPONENT)); + CHKiRet(objUse(glbl, CORE_COMPONENT)); CHKiRet(objUse(net, LM_NET_FILENAME)); /* register config file handlers */ |