From eed27e5fb116940aefb881f2f2d4b103309660b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Thu, 12 Sep 2002 07:31:56 +0000 Subject: [PATCH] Fixed "could not print ..." log warning. git-svn-id: https://svn.perl.org/qpsmtpd/trunk@74 958fd67b-6ff1-0310-b445-bb7760255be9 --- Changes | 4 ++++ lib/Qpsmtpd/TcpServer.pm | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index a442df8..7d51283 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +2002/09/12 + Fix "Could not print" error message in the TcpServer object. (Thanks + to Ross Mueller ) + 2002/09/10 dnsbl plugin queues lookups in the background upon connect but doesn't block for the results until they are needed, greatly diff --git a/lib/Qpsmtpd/TcpServer.pm b/lib/Qpsmtpd/TcpServer.pm index 8df452a..a2885b8 100644 --- a/lib/Qpsmtpd/TcpServer.pm +++ b/lib/Qpsmtpd/TcpServer.pm @@ -27,12 +27,13 @@ sub run { $self->start_conversation; # this should really be the loop and read_input should just get one line; I think - + $self->read_input; } sub read_input { my $self = shift; + my $timeout = $self->config('timeout'); alarm $timeout; while () { @@ -50,7 +51,7 @@ sub respond { while (my $msg = shift @messages) { my $line = $code . (@messages?"-":" ").$msg; $self->log(1, "$line"); - print "$line\r\n" or ($self->log("Could not print [$line]: $!"), return 0); + print "$line\r\n" or ($self->log(1, "Could not print [$line]: $!"), return 0); } return 1; }