Fixed "could not print ..." log warning.

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@74 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2002-09-12 07:31:56 +00:00
parent f28c9429a2
commit eed27e5fb1
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2002/09/12
Fix "Could not print" error message in the TcpServer object. (Thanks
to Ross Mueller <ross@visual.com>)
2002/09/10
dnsbl plugin queues lookups in the background upon connect but
doesn't block for the results until they are needed, greatly

View File

@ -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 (<STDIN>) {
@ -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;
}