You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by ms...@apache.org on 2005/06/06 15:02:41 UTC

svn commit: r180306 - /spamassassin/trunk/spamd/spamd.raw

Author: mss
Date: Mon Jun  6 06:02:39 2005
New Revision: 180306

URL: http://svn.apache.org/viewcvs?rev=180306&view=rev
Log:
* For bug 4380:  Add internal socket name to error output to see if IO::Socket::UNIX mangles the path internally on BSD.
* Removed some useless $@ from error messages (there are no evals involved).

Modified:
    spamassassin/trunk/spamd/spamd.raw

Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/spamd/spamd.raw?rev=180306&r1=180305&r2=180306&view=diff
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Mon Jun  6 06:02:39 2005
@@ -586,13 +586,13 @@
     Type   => SOCK_STREAM,
     Listen => SOMAXCONN,
   );
-  dbg("spamd: creating UNIX socket:\n" . join("\n", map { "\t$_: " . (defined $socket{$_} ? $socket{$_} : "(undef)") } sort keys %socket));
+  dbg("spamd: creating UNIX socket:\n" . join("\n", map { " $_: " . (defined $socket{$_} ? $socket{$_} : "(undef)") } sort keys %socket));
   $server = new IO::Socket::UNIX(%socket)
-         || die "spamd: could not create UNIX socket on $path: $! ($@)\n";
+         || die "spamd: could not create UNIX socket on $path: $!\n";
 
   # sanity check!
   if (!-S $path) {
-    die "spamd: could not find newly-created UNIX socket on $path: $! ($@)\n";
+    die "spamd: could not find newly-created UNIX socket on $path (" . $server->hostpath() . "): $!\n";
   }
 
   my $mode = $opt{socketmode};
@@ -618,12 +618,12 @@
       $gid = $ggid;
     }
     if (!chown $uid, $gid, $path) {
-      die "spamd: could not chown $path to $uid/$gid: $! ($@)";
+      die "spamd: could not chown $path to $uid/$gid: $!";
     }
   }
 
   if (!chmod $mode, $path) {    # make sure everybody can talk to it
-    die "spamd: could not chmod $path to $mode: $! ($@)";
+    die "spamd: could not chmod $path to $mode: $!";
   }
 }
 elsif ( $opt{'ssl'} ) {
@@ -638,9 +638,9 @@
     SSL_key_file    => $opt{'server-key'},
     SSL_cert_file   => $opt{'server-cert'}
   );
-  dbg("spamd: creating SSL socket:\n" . join("\n", map { "\t$_:  " . (defined $socket{$_} ? $socket{$_} : "(undef)") } sort keys %socket));
+  dbg("spamd: creating SSL socket:\n" . join("\n", map { " $_:  " . (defined $socket{$_} ? $socket{$_} : "(undef)") } sort keys %socket));
   $server = new IO::Socket::SSL(%socket)
-         || die "spamd: could not create SSL socket on $addr:$port: $! ($@)\n";
+         || die "spamd: could not create SSL socket on $addr:$port: $!\n";
 }
 else {
   my %socket = (
@@ -651,9 +651,9 @@
     ReuseAddr => 1,
     Listen    => SOMAXCONN
   );
-  dbg("spamd: creating INET socket:\n" . join("\n", map { "\t$_: " . (defined $socket{$_} ? $socket{$_} : "(undef)") } sort keys %socket));
+  dbg("spamd: creating INET socket:\n" . join("\n", map { " $_: " . (defined $socket{$_} ? $socket{$_} : "(undef)") } sort keys %socket));
   $server = new IO::Socket::INET(%socket)
-         || die "spamd: could not create INET socket on $addr:$port: $! ($@)\n";
+         || die "spamd: could not create INET socket on $addr:$port: $!\n";
 }
 
 if ( defined $opt{'pidfile'} ) {