From 933d76ecf939f78610ece0d7b8418723ef359cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Tue, 15 Apr 2003 18:10:44 +0000 Subject: [PATCH] Fixed timeout bug when the client sent DATA and then stopped before sending the next line. (Gergely Risko ) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@138 958fd67b-6ff1-0310-b445-bb7760255be9 --- CREDITS | 2 ++ Changes | 3 +++ lib/Qpsmtpd/SMTP.pm | 2 ++ 3 files changed, 7 insertions(+) diff --git a/CREDITS b/CREDITS index f852099..790729c 100644 --- a/CREDITS +++ b/CREDITS @@ -24,5 +24,7 @@ Changes file. Kee Hinckley : Sent me the correct strftime format for the dates in the "Received" headers. +Gergely Risko : Fixed timeout bug when the client sent +DATA and then stopped before sending the next line. ... and many others per the Change file! diff --git a/Changes b/Changes index fa6578b..6285b70 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ 0.26-dev + Fixed timeout bug when the client sent DATA and then stopped before + sending the next line. (Gergely Risko ) + unrecognized_command hook and a count_unrecognized_commands plugin. (Rasjid Wilcox) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 031db29..8310977 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -320,6 +320,8 @@ sub data { my $timeout = $self->config('timeout'); + alarm $timeout; + while () { $complete++, last if $_ eq ".\r\n"; $i++;