From 3eff8e5404a3792acbd4ad00f5c4675a940a0eeb Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 26 Dec 2007 17:09:46 +0000 Subject: removed imudp code dependency on "finet" --- syslogd.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index e51841ae..e1179720 100644 --- a/syslogd.c +++ b/syslogd.c @@ -422,9 +422,7 @@ static int logEveryMsg = 0;/* no repeat message processing - read-only after st static unsigned int Forwarding = 0; char LocalHostName[MAXHOSTNAMELEN+1];/* our hostname - read-only after startup */ char *LocalDomain; /* our local domain name - read-only after startup */ -int *finet = NULL; /* Internet datagram sockets, first element is nbr of elements - * read-only after init(), but beware of restart! */ -static char *LogPort = "514"; /* port number for INET connections */ +char *LogPort = "514"; /* port number for INET connections */ static int MarkInterval = 20 * 60; /* interval between marks in seconds - read-only after startup */ int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both), set via cmdline */ int send_to_all = 0; /* send message to all IPv4/IPv6 addresses */ @@ -2772,12 +2770,6 @@ die(int sig) queueDelete(pMsgQueue); /* delete fifo here! */ pMsgQueue = NULL; - /* now clean up the listener part */ -#ifdef SYSLOG_INET - /* Close the UDP inet socket. */ - closeUDPListenSockets(finet); -#endif - /* rger 2005-02-22 * now clean up the in-memory structures. OK, the OS * would also take care of that, but if we do it @@ -3571,24 +3563,6 @@ init(void) pDfltProgNameCmp = NULL; } -#ifdef SYSLOG_INET - /* I have moved initializing UDP sockets before the TCP sockets. This ensures - * they are as soon ready for reception as possible. Of course, it is only a - * very small window of exposure, but it doesn't hurt to limit the message - * loss risk to as low as possible - especially if it costs nothing... - * rgerhards, 2007-06-28 - */ - if(Forwarding || AcceptRemote) { - if (finet == NULL) { - if((finet = create_udp_socket(NULL, (uchar*)LogPort, 1)) != NULL) - dbgprintf("Opened %d syslog UDP port(s).\n", *finet); - } - } else { - /* this case can happen during HUP processing. */ - closeUDPListenSockets(finet); - } -#endif - /* create message queue */ pMsgQueue = queueInit(); if(pMsgQueue == NULL) { -- cgit v1.2.3