cvs commit: qpsmtpd/lib/Qpsmtpd SelectServer.pm

[email protected] (Matt Sergeant)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     03/11/03 00:22:24

  Modified:    lib/Qpsmtpd SelectServer.pm
  Log:
  Oops, got the wrong end of the socket for the IP address!
  
  Revision  Changes    Path
  1.5       +2 -5      qpsmtpd/lib/Qpsmtpd/SelectServer.pm
  
  Index: SelectServer.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/SelectServer.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- SelectServer.pm	2 Nov 2003 19:00:17 -0000	1.4
  +++ SelectServer.pm	3 Nov 2003 08:22:24 -0000	1.5
  @@ -46,17 +46,14 @@
                   my $client_addr;
                   $client = $server->accept();
                   next unless $client;
  -                my $ip = $client->sockhost;
  -                #my $revip = join('.', reverse(split(/\./, $ip)));
  -                #print "Looking up: $revip.in-addr.arpa\n";
  -                #my $bgsock  = $res->bgsend("$revip.in-addr.arpa", 'PTR');
  +                my $ip = $client->peerhost;
                   my $bgsock  = $res->bgsend($ip);
                   $select->add($bgsock);
                   $lookup{$bgsock} = $client;
               }
               elsif (my $qpclient = $lookup{$client}) {
                   my $packet = $res->bgread($client);
  -                my $ip = $qpclient->sockhost;
  +                my $ip = $qpclient->peerhost;
                   my $hostname = $ip;
                   if ($packet) {
                       foreach my $rr ($packet->answer) {
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.