develooper Front page | perl.cvs.qpsmtpd | Postings from November 2006

[svn:qpsmtpd] r673 - branches/0.3x

From:
hjp
Date:
November 6, 2006 01:31
Subject:
[svn:qpsmtpd] r673 - branches/0.3x
Message ID:
20061106090640.F17F7CBA84@x12.develooper.com
Author: hjp
Date: Mon Nov  6 01:06:39 2006
New Revision: 673

Modified:
   branches/0.3x/qpsmtpd-forkserver

Log:
Older perls don't know constant AF_INET6, but don't mind a function
which is never called.


Modified: branches/0.3x/qpsmtpd-forkserver
==============================================================================
--- branches/0.3x/qpsmtpd-forkserver	(original)
+++ branches/0.3x/qpsmtpd-forkserver	Mon Nov  6 01:06:39 2006
@@ -230,9 +230,9 @@
     my ($port, $iaddr) = ($server->sockdomain == AF_INET) ? (sockaddr_in($hisaddr)) : (sockaddr_in6($hisaddr));
     my $localsockaddr = getsockname($client);
     my ($lport, $laddr) = ($server->sockdomain == AF_INET) ? (sockaddr_in($localsockaddr)) : (sockaddr_in6($localsockaddr));
-    my $nto_iaddr = ($server->sockdomain == AF_INET) ? (inet_ntoa($iaddr)) : (inet_ntop(AF_INET6, $iaddr));
-    my $ton_iaddr = ($server->sockdomain == AF_INET) ? (inet_aton($iaddr)) : (inet_pton(AF_INET6, $iaddr));
-    my $nto_laddr = ($server->sockdomain == AF_INET) ? (inet_ntoa($laddr)) : (inet_ntop(AF_INET6, $laddr));
+    my $nto_iaddr = ($server->sockdomain == AF_INET) ? (inet_ntoa($iaddr)) : (inet_ntop(AF_INET6(), $iaddr));
+    my $ton_iaddr = ($server->sockdomain == AF_INET) ? (inet_aton($iaddr)) : (inet_pton(AF_INET6(), $iaddr));
+    my $nto_laddr = ($server->sockdomain == AF_INET) ? (inet_ntoa($laddr)) : (inet_ntop(AF_INET6(), $laddr));
     $nto_iaddr =~ s/::ffff://;
     $nto_laddr =~ s/::ffff://;
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About