summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-09-07 16:54:14 +0000
committerStef Walter <stef@memberwebs.com>2004-09-07 16:54:14 +0000
commit11707e4be5b8cef1caf6ee2604c41368056afc81 (patch)
treef29693da2c94f3db2caba3b96eacd5bda96b0cff
parente24fbacde6bbe2ef037ae663351303f66febc626 (diff)
Don't quit when can't create thread.
-rw-r--r--ChangeLog3
-rw-r--r--configure.in6
-rw-r--r--src/clamsmtpd.c12
3 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 0628512..96ad2a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+0.9
+ - Don't quit when too many threads created
+
0.8
- clamsmtpd now uses a configuration file
- Transparent proxy support [Andreas Steinmetz]
diff --git a/configure.in b/configure.in
index c6a889e..1ad301d 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-dnl
+>dnl
dnl Copyright (c) 2004, Nate Nielsen
dnl All rights reserved.
dnl
@@ -36,8 +36,8 @@ dnl Nate Nielsen <nielsen@memberwebs.com>
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(clamsmtp, 0.8, nielsen@memberwebs.com)
-AM_INIT_AUTOMAKE(clamsmtp, 0.8)
+AC_INIT(clamsmtp, 0.8.90, nielsen@memberwebs.com)
+AM_INIT_AUTOMAKE(clamsmtp, 0.8.90)
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CFLAGS="$CFLAGS -I/usr/local/include"
diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c
index 85b9a14..4c08919 100644
--- a/src/clamsmtpd.c
+++ b/src/clamsmtpd.c
@@ -502,9 +502,17 @@ static void connection_loop(int sock)
(void*)(threads + i));
if(r != 0)
{
+ threads[i].fd = -1;
+ threads[i].tid = 0;
+
errno = r;
- message(NULL, LOG_ERR, "couldn't create thread");
- ((clstate_t*)g_state)->quit = 1;
+ message(NULL, LOG_ERR, "couldn't create thread for connection");
+ write(fd, SMTP_STARTFAILED, KL(SMTP_STARTFAILED));
+
+ shutdown(fd, SHUT_RDWR);
+ close(fd);
+ fd = -1;
+
break;
}