summaryrefslogtreecommitdiffstats
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
parentdfe56e84a71231a9ad3c9248ebad58686f6679b9 (diff)
downloadrsyslog-196a0616fc25ee5601c96c51755b794fa45aeabd.tar.gz
rsyslog-196a0616fc25ee5601c96c51755b794fa45aeabd.tar.xz
rsyslog-196a0616fc25ee5601c96c51755b794fa45aeabd.zip
fixed some bugs found in final testing...
-rw-r--r--Makefile6
-rw-r--r--syslogd.c9
2 files changed, 7 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index c2b6b12e..67b9ffde 100644
--- a/Makefile
+++ b/Makefile
@@ -17,8 +17,8 @@ CC= gcc
# enables the MySQL code. By default, that one is commented out
# change the comment chars to activate it if you need MySQL!
# In this case, also look down further to uncomment the libs
-CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce $(NOLARGEFILE)
-#CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce -DWITH_DB -I/usr/local/include $(NOLARGEFILE)
+#CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce $(NOLARGEFILE)
+CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce -DWITH_DB -I/usr/local/include $(NOLARGEFILE)
LDFLAGS= -s
INSTALL = install
@@ -26,7 +26,7 @@ BINDIR = /usr/sbin
MANDIR = /usr/share/man
# Uncomment the following to use mysql.
-#LIBS = -lmysqlclient -L/usr/local/lib/mysql
+LIBS = -lmysqlclient -L/usr/local/lib/mysql
# There is one report that under an all ELF system there may be a need to
# explicilty link with libresolv.a. If linking syslogd fails you may wish
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);