diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-17 09:25:03 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-17 09:25:03 +0200 |
commit | 8c65706d22cb62d724a030b5f0a9603751daac2d (patch) | |
tree | 0424fa57791d76ecb5b05dae337381ccec407124 /runtime/net.c | |
parent | 87c936ab65b4381fed35689b38c98f130883d903 (diff) | |
download | rsyslog-8c65706d22cb62d724a030b5f0a9603751daac2d.tar.gz rsyslog-8c65706d22cb62d724a030b5f0a9603751daac2d.tar.xz rsyslog-8c65706d22cb62d724a030b5f0a9603751daac2d.zip |
moved "family" variable to global data pool
Diffstat (limited to 'runtime/net.c')
-rw-r--r-- | runtime/net.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/net.c b/runtime/net.c index cf033383..6d67693f 100644 --- a/runtime/net.c +++ b/runtime/net.c @@ -69,6 +69,7 @@ MODULE_TYPE_LIB /* static data */ DEFobjStaticHelpers DEFobjCurrIf(errmsg) +DEFobjCurrIf(glbl) /* support for defining allowed TCP and UDP senders. We use the same * structure to implement this (a linked list), but we define two different @@ -930,7 +931,7 @@ int *create_udp_socket(uchar *hostname, uchar *pszPort, int bIsServer) hints.ai_flags = AI_PASSIVE | AI_NUMERICSERV; else hints.ai_flags = AI_NUMERICSERV; - hints.ai_family = family; + hints.ai_family = glbl.GetDefPFFamily(); hints.ai_socktype = SOCK_DGRAM; error = getaddrinfo((char*) hostname, (char*) pszPort, &hints, &res); if(error) { @@ -1103,6 +1104,7 @@ ENDobjQueryInterface(net) BEGINObjClassExit(net, OBJ_IS_LOADABLE_MODULE) /* CHANGE class also in END MACRO! */ CODESTARTObjClassExit(net) /* release objects we no longer need */ + objRelease(glbl, CORE_COMPONENT); objRelease(errmsg, CORE_COMPONENT); ENDObjClassExit(net) @@ -1114,6 +1116,7 @@ ENDObjClassExit(net) BEGINAbstractObjClassInit(net, 1, OBJ_IS_CORE_MODULE) /* class, version */ /* request objects we use */ CHKiRet(objUse(errmsg, CORE_COMPONENT)); + CHKiRet(objUse(glbl, CORE_COMPONENT)); /* set our own handlers */ ENDObjClassInit(net) |