qpsmtpd (x)inetd: fix Can't call method "connected" on an undefined value at lib/Qpsmtpd/TcpServer.pm line 174.

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@962 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Hanno Hecker 2008-12-31 07:29:14 +00:00 committed by Ask Bjørn Hansen
parent 39f7e9163c
commit d4743d28b6

View File

@ -21,10 +21,15 @@ $ENV{PATH} = '/bin:/usr/bin:/var/qmail/bin';
my $qpsmtpd = Qpsmtpd::TcpServer->new();
$qpsmtpd->load_plugins();
$qpsmtpd->start_connection();
$qpsmtpd->run();
$qpsmtpd->run(\*STDIN); # pass the "socket" like -prefork/-forkserver
$qpsmtpd->run_hooks("post-connection");
$qpsmtpd->connection->reset;
# needed for Qpsmtpd::TcpServer::check_socket():
# emulate IO::Socket::connected on STDIN. STDIN was used instead of STDOUT
# because the other code also calls getpeername(STDIN).
sub IO::Handle::connected { return getpeername(shift) }
__END__