spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felic...@apache.org
Subject svn commit: rev 22683 - in spamassassin/trunk: spamc spamd
Date Wed, 07 Jul 2004 19:55:45 GMT
Author: felicity
Date: Wed Jul  7 12:55:44 2004
New Revision: 22683

Modified:
   spamassassin/trunk/spamc/spamc.c
   spamassassin/trunk/spamd/spamd.raw
Log:
bug 3571: version information from spamc/spamd should goto stdout not stderr.  also, output
information on SSL support if available.

Modified: spamassassin/trunk/spamc/spamc.c
==============================================================================
--- spamassassin/trunk/spamc/spamc.c	(original)
+++ spamassassin/trunk/spamc/spamc.c	Wed Jul  7 12:55:44 2004
@@ -39,6 +39,13 @@
 #include <arpa/inet.h>
 #endif
 
+#ifdef SPAMC_SSL
+#include <openssl/crypto.h>
+#ifndef OPENSSL_VERSION_TEXT
+#define OPENSSL_VERSION_TEXT "OpenSSL"
+#endif
+#endif
+
 #ifdef HAVE_SYSEXITS_H
 #include <sysexits.h>
 #endif
@@ -94,13 +101,16 @@
 void
 print_version(void)
 {
-    fprintf(stderr, "%s version %s\n", "SpamAssassin Client", VERSION_STRING);
+    printf("%s version %s\n", "SpamAssassin Client", VERSION_STRING);
+    #ifdef SPAMC_SSL
+    printf("  compiled with SSL support (%s)\n", OPENSSL_VERSION_TEXT);
+    #endif
 }
 
 static void
 usg(char *str)
 {
-  fprintf(stderr, "%s", str);
+  printf("%s", str);
 }
 
 void

Modified: spamassassin/trunk/spamd/spamd.raw
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw	(original)
+++ spamassassin/trunk/spamd/spamd.raw	Wed Jul  7 12:55:44 2004
@@ -83,8 +83,10 @@
 
 
 sub print_version {
-  print "SpamAssassin Server version " . Mail::SpamAssassin::Version() . "\n"
-      . "  running on Perl version " . join(".", map { $_ * 1 } ($] =~ /(\d)\.(\d{3})(\d{3})/
)) . "\n";
+  printf("%s version %s\n", "SpamAssassin Server", Mail::SpamAssassin::Version());
+  printf("  running on Perl %s\n", join(".", map { $_*1 } ($] =~ /(\d)\.(\d{3})(\d{3})/)));
+  eval { require IO::Socket::SSL; };
+  printf("  with SSL support (%s %s)\n", "IO::Socket::SSL", $IO::Socket::SSL::VERSION) unless
($@);
 }
 
 sub print_usage_and_exit {

Mime
View raw message