Fix doubly declared variable

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@806 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2007-10-04 15:18:34 +00:00
parent 275fce4764
commit 1e73edf94a

View File

@ -2,6 +2,8 @@
package Qpsmtpd::PollServer; package Qpsmtpd::PollServer;
use Event::Lib qw(:dns);
use base ('Danga::Client', 'Qpsmtpd::SMTP'); use base ('Danga::Client', 'Qpsmtpd::SMTP');
# use fields required to be a subclass of Danga::Client. Have to include # use fields required to be a subclass of Danga::Client. Have to include
# all fields used by Qpsmtpd.pm here too. # all fields used by Qpsmtpd.pm here too.
@ -177,12 +179,18 @@ sub start_conversation {
$conn->remote_ip($ip); $conn->remote_ip($ip);
$conn->remote_port($port); $conn->remote_port($port);
$conn->remote_info("[$ip]"); $conn->remote_info("[$ip]");
ParaDNS->new(
finished => sub { $self->run_hooks("connect") }, event_resolve_reverse($ip, sub {
# NB: Setting remote_info to the same as remote_host $conn->remote_info($conn->remote_host($_[3]));
callback => sub { $conn->remote_info($conn->remote_host($_[0])) }, $self->run_hooks('connect');
host => $ip, });
);
# ParaDNS->new(
# finished => sub { $self->run_hooks("connect") },
# # NB: Setting remote_info to the same as remote_host
# callback => sub { $conn->remote_info($conn->remote_host($_[0])) },
# host => $ip,
# );
return; return;
} }
@ -303,8 +311,6 @@ sub end_of_data {
$self->log(LOGDEBUG, "max_size: $self->{max_size} / size: $self->{data_size}"); $self->log(LOGDEBUG, "max_size: $self->{max_size} / size: $self->{data_size}");
my $smtp = $self->connection->hello eq "ehlo" ? "ESMTP" : "SMTP";
my $header = $self->transaction->header; my $header = $self->transaction->header;
if (!$header) { if (!$header) {
$header = Mail::Header->new(Modify => 0, MailFrom => "COERCE"); $header = Mail::Header->new(Modify => 0, MailFrom => "COERCE");