summaryrefslogtreecommitdiffstats
path: root/omfwd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-07 08:06:16 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-07 08:06:16 +0000
commitfa67273c1644551b50919fa7879acfdc92e269bc (patch)
tree38e41ee526a4bcc19540047c56c93b2a7865ef36 /omfwd.c
parentae3e3e9cb1584b5cf7082c1b28c4cbbd48b1f664 (diff)
downloadrsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.tar.gz
rsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.tar.xz
rsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.zip
- added RSYSLOGD_MODDIR environment variable
- added -M rsyslogd option (allows to specify module directory location) - converted net.c into a loadable library plugin
Diffstat (limited to 'omfwd.c')
-rw-r--r--omfwd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/omfwd.c b/omfwd.c
index a9fed18c..a931fdec 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -83,6 +83,7 @@ MODULE_TYPE_OUTPUT
*/
DEF_OMOD_STATIC_DATA
DEFobjCurrIf(errmsg)
+DEFobjCurrIf(net)
typedef struct _instanceData {
char f_hname[MAXHOSTNAMELEN+1];
@@ -150,7 +151,7 @@ CODESTARTfreeInstance
if(pData->sock >= 0)
close(pData->sock);
if(pData->pSockArray != NULL)
- closeUDPListenSockets(pData->pSockArray);
+ net.closeUDPListenSockets(pData->pSockArray);
ENDfreeInstance
@@ -358,7 +359,7 @@ CODESTARTdoAction
*/
if(pData->protocol == FORW_UDP) {
if(pData->pSockArray == NULL) {
- pData->pSockArray = create_udp_socket((uchar*)pData->f_hname, NULL, 0);
+ pData->pSockArray = net.create_udp_socket((uchar*)pData->f_hname, NULL, 0);
}
}
if ( 0) // TODO: think about this strcmp(getHOSTNAME(f->f_pMsg), LocalHostName) && NoHops )
@@ -621,6 +622,7 @@ CODESTARTmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
+ CHKiRet(objUse(net, "net"));
ENDmodInit
#endif /* #ifdef SYSLOG_INET */