TcpServer: don't 'use parent Qpsmtpd::Base'
it breaks stuff. Instead, grab a base object and use it
This commit is contained in:
parent
98d148a0bf
commit
cad4f2b1d6
@ -5,10 +5,12 @@ use POSIX ();
|
|||||||
use Socket;
|
use Socket;
|
||||||
|
|
||||||
use lib 'lib';
|
use lib 'lib';
|
||||||
|
use Qpsmtpd::Base;
|
||||||
use Qpsmtpd::Constants;
|
use Qpsmtpd::Constants;
|
||||||
use parent 'Qpsmtpd::Base';
|
|
||||||
use parent 'Qpsmtpd::SMTP';
|
use parent 'Qpsmtpd::SMTP';
|
||||||
|
|
||||||
|
my $base = Qpsmtpd::Base->new();
|
||||||
|
|
||||||
my $has_ipv6 = 0;
|
my $has_ipv6 = 0;
|
||||||
if (
|
if (
|
||||||
eval { require Socket6; } &&
|
eval { require Socket6; } &&
|
||||||
@ -55,7 +57,7 @@ sub conn_info_inetd {
|
|||||||
|
|
||||||
my ($r_port, $iaddr) = sockaddr_in($hersockaddr);
|
my ($r_port, $iaddr) = sockaddr_in($hersockaddr);
|
||||||
my $r_ip = inet_ntoa($iaddr);
|
my $r_ip = inet_ntoa($iaddr);
|
||||||
my ($r_host) = $self->resolve_ptr($r_ip) || "[$r_ip]";
|
my ($r_host) = $base->resolve_ptr($r_ip) || "[$r_ip]";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
local_ip => '',
|
local_ip => '',
|
||||||
@ -193,7 +195,9 @@ sub tcpenv {
|
|||||||
return $TCPLOCALIP, $TCPREMOTEIP,
|
return $TCPLOCALIP, $TCPREMOTEIP,
|
||||||
$TCPREMOTEIP ? "[$ENV{TCPREMOTEIP}]" : "[noip!]";
|
$TCPREMOTEIP ? "[$ENV{TCPREMOTEIP}]" : "[noip!]";
|
||||||
}
|
}
|
||||||
my ($TCPREMOTEHOST) = $self->resolve_ptr($TCPREMOTEIP) || 'Unknown';
|
my ($TCPREMOTEHOST) = $base->resolve_ptr($TCPREMOTEIP);
|
||||||
|
$TCPREMOTEHOST ||= 'Unknown';
|
||||||
|
|
||||||
return $TCPLOCALIP, $TCPREMOTEIP, $TCPREMOTEHOST;
|
return $TCPLOCALIP, $TCPREMOTEIP, $TCPREMOTEHOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user