From d4743d28b60c905943bbd067ae620c28bf98ccae Mon Sep 17 00:00:00 2001 From: Hanno Hecker Date: Wed, 31 Dec 2008 07:29:14 +0000 Subject: [PATCH] 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 --- qpsmtpd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qpsmtpd b/qpsmtpd index b11a489..0831586 100755 --- a/qpsmtpd +++ b/qpsmtpd @@ -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__