summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2005-07-05 14:50:44 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2005-07-05 14:50:44 +0000
commit196a0616fc25ee5601c96c51755b794fa45aeabd (patch)
tree3600e617f41c6760beec205286158fda8e077d16 /syslogd.c
parentdfe56e84a71231a9ad3c9248ebad58686f6679b9 (diff)
downloadrsyslog-196a0616fc25ee5601c96c51755b794fa45aeabd.tar.gz
rsyslog-196a0616fc25ee5601c96c51755b794fa45aeabd.tar.xz
rsyslog-196a0616fc25ee5601c96c51755b794fa45aeabd.zip
fixed some bugs found in final testing...
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/syslogd.c b/syslogd.c
index 82762681..0ec47d70 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2173,7 +2173,7 @@ int main(argc, argv)
if ( Debug )
{
dprintf("Debugging disabled, SIGUSR1 to turn on debugging.\n");
- debugging_on = 0;
+ /*debugging_on = 0;*/
}
/*
* Send a signal to the parent to it can terminate.
@@ -2217,7 +2217,7 @@ int main(argc, argv)
/* Add the TCP socket to the list of read descriptors.
*/
- if(bEnableTCP) {
+ if(bEnableTCP && sockTCPLstn != -1) {
FD_SET(sockTCPLstn, &readfds);
if (sockTCPLstn>maxfds) maxfds=sockTCPLstn;
dprintf("Listening on syslog TCP port.\n");
@@ -2330,7 +2330,7 @@ int main(argc, argv)
}
}
- if(bEnableTCP) {
+ if(bEnableTCP && sockTCPLstn != -1) {
/* Now check for TCP */
if(FD_ISSET(sockTCPLstn, &readfds)) {
dprintf("New connect on TCP inetd socket: #%d\n", sockTCPLstn);
@@ -2351,7 +2351,6 @@ int main(argc, argv)
/* Receive message */
state = recv(fd, buf, sizeof(buf), 0);
- printf("recv state %d\n", state);
if(state == 0) {
/* Session closed */
TCPSessClose(iTCPSess);
@@ -3933,7 +3932,7 @@ void die(sig)
if (InetInuse) close(inetm);
/* Close the TCP inet socket. */
- if(bEnableTCP) {
+ if(bEnableTCP && sockTCPLstn != -1) {
int iTCPSess;
/* close all TCP connections! */
iTCPSess = TCPSessGetNxtSess(-1);