cvs commit: qpsmtpd qpsmtpd-forkserver

[email protected] (Robert Spier)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     04/08/29 00:57:07

  Modified:    .        qpsmtpd-forkserver
  Log:
  - set a sane ALRM handler
  - pass more information to the Connection
  
  Revision  Changes    Path
  1.12      +12 -2     qpsmtpd/qpsmtpd-forkserver
  
  Index: qpsmtpd-forkserver
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/qpsmtpd-forkserver,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -w -r1.11 -r1.12
  --- qpsmtpd-forkserver	14 Aug 2004 17:42:45 -0000	1.11
  +++ qpsmtpd-forkserver	29 Aug 2004 07:57:07 -0000	1.12
  @@ -151,6 +151,10 @@
       close($server);
   
       $SIG{$_} = 'DEFAULT' for keys %SIG;
  +    $SIG{ALRM} = sub { 
  +       print $client "421 Connection Timed Out\n";
  +       ::log(LOGINFO, "Connection Timed Out"); 
  +       exit; };
       
       my $localsockaddr = getsockname($client);
       my ($lport, $laddr) = sockaddr_in($localsockaddr);
  @@ -169,7 +173,13 @@
       POSIX::dup2(fileno($client), 1);
       
       my $qpsmtpd = Qpsmtpd::TcpServer->new();
  -    $qpsmtpd->start_connection();
  +    $qpsmtpd->start_connection
  +      (
  +       local_ip    => $ENV{TCPLOCALIP},
  +       local_port  => $lport,
  +       remote_ip   => $ENV{TCPREMOTEIP},
  +       remote_port => $port,
  +      );
       $qpsmtpd->run();
   
       exit;                                   # child leaves
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.