From 11707e4be5b8cef1caf6ee2604c41368056afc81 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 7 Sep 2004 16:54:14 +0000 Subject: Don't quit when can't create thread. --- ChangeLog | 3 +++ configure.in | 6 +++--- src/clamsmtpd.c | 12 ++++++++++-- 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 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; } -- cgit v1.2.3