make loglevels here consistent with the TcpServer.pm changes (from who knows when)

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@734 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2007-05-11 07:52:35 +00:00
parent c2e2f29878
commit 8009a316c6

View File

@ -29,7 +29,7 @@ sub read_input {
while (<STDIN>) { while (<STDIN>) {
alarm 0; alarm 0;
$_ =~ s/\r?\n$//s; # advanced chomp $_ =~ s/\r?\n$//s; # advanced chomp
$self->log(LOGDEBUG, "dispatching $_"); $self->log(LOGINFO, "dispatching $_");
$self->connection->notes('original_string', $_); $self->connection->notes('original_string', $_);
defined $self->dispatch(split / +/, $_, 2) defined $self->dispatch(split / +/, $_, 2)
or $self->respond(502, "command unrecognized: '$_'"); or $self->respond(502, "command unrecognized: '$_'");
@ -48,7 +48,7 @@ sub respond {
my ($self, $code, @messages) = @_; my ($self, $code, @messages) = @_;
while (my $msg = shift @messages) { while (my $msg = shift @messages) {
my $line = $code . (@messages?"-":" ").$msg; my $line = $code . (@messages?"-":" ").$msg;
$self->log(LOGDEBUG, $line); $self->log(LOGINFO, $line);
print "$line\r\n" or ($self->log(LOGERROR, "Could not print [$line]: $!"), return 0); print "$line\r\n" or ($self->log(LOGERROR, "Could not print [$line]: $!"), return 0);
} }
return 1; return 1;
@ -56,7 +56,7 @@ sub respond {
sub disconnect { sub disconnect {
my $self = shift; my $self = shift;
$self->log(LOGDEBUG,"click, disconnecting"); $self->log(LOGINFO,"click, disconnecting");
$self->SUPER::disconnect(@_); $self->SUPER::disconnect(@_);
$self->run_hooks("post-connection"); $self->run_hooks("post-connection");
die "disconnect_tcpserver"; die "disconnect_tcpserver";