You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2013/03/15 15:24:20 UTC
svn commit: r1456965 - /spamassassin/trunk/spamd/spamd.raw
Author: mmartinec
Date: Fri Mar 15 14:24:20 2013
New Revision: 1456965
URL: http://svn.apache.org/r1456965
Log:
spamd.raw: avoid an unnecessary complication creating a socket through new_io_socket_inetx
Modified:
spamassassin/trunk/spamd/spamd.raw
Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamd/spamd.raw?rev=1456965&r1=1456964&r2=1456965&view=diff
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Fri Mar 15 14:24:20 2013
@@ -180,15 +180,12 @@ BEGIN {
if (eval { require IO::Socket::IP }) { # handles IPv6 and IPv4
IO::Socket::IP->VERSION(0.09); # implements IPV6_V6ONLY
$io_socket_module_name = 'IO::Socket::IP';
- *new_io_socket_inetx = sub { IO::Socket::IP->new(@_) };
} elsif (eval { require IO::Socket::INET6 }) { # handles IPv6 and IPv4
$io_socket_module_name = 'IO::Socket::INET6';
- *new_io_socket_inetx = sub { IO::Socket::INET6->new(@_) };
} elsif (eval { require IO::Socket::INET }) { # IPv4 only
$io_socket_module_name = 'IO::Socket::INET';
- *new_io_socket_inetx = sub { IO::Socket::INET->new(@_) };
}
$have_inet4 = # can we create a PF_INET socket?
@@ -908,7 +905,7 @@ sub server_sock_setup_unix {
die "spamd: file $path exists but is no socket, exiting\n";
}
- if ( new IO::Socket::UNIX( Peer => $path, Type => &SOCK_STREAM ) ) {
+ if ( IO::Socket::UNIX->new( Peer => $path, Type => &SOCK_STREAM ) ) {
# socket bind successful: must already be running
# make sure not to enter this socket into @listen_sockets,
@@ -1048,7 +1045,7 @@ sub server_sock_setup_inet {
$have_ssl_module = 1;
}
my $server_inet = $ssl ? IO::Socket::SSL->new(%sockopt)
- : new_io_socket_inetx(%sockopt);
+ : $io_socket_module_name->new(%sockopt);
$server_inet
or die sprintf("spamd: could not create %s socket on [%s]:%s: %s\n",
$ssl ? 'IO::Socket::SSL' : $io_socket_module_name,