spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: r190364 - in /spamassassin/trunk: MANIFEST spamd/spamd.raw t/spamd_ssl_accept_fail.t
Date Mon, 13 Jun 2005 07:03:32 GMT
Author: jm
Date: Mon Jun 13 00:03:31 2005
New Revision: 190364

URL: http://svn.apache.org/viewcvs?rev=190364&view=rev
Log:
bug 4107: spamd was crashing if expecting an SSL connection and a non-SSL connection was received;
fixed

Added:
    spamassassin/trunk/t/spamd_ssl_accept_fail.t   (with props)
Modified:
    spamassassin/trunk/MANIFEST
    spamassassin/trunk/spamd/spamd.raw

Modified: spamassassin/trunk/MANIFEST
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/MANIFEST?rev=190364&r1=190363&r2=190364&view=diff
==============================================================================
--- spamassassin/trunk/MANIFEST (original)
+++ spamassassin/trunk/MANIFEST Mon Jun 13 00:03:31 2005
@@ -417,6 +417,7 @@
 t/spamd_report.t
 t/spamd_report_ifspam.t
 t/spamd_ssl.t
+t/spamd_ssl_accept_fail.t
 t/spamd_stop.t
 t/spamd_symbols.t
 t/spamd_syslog.t

Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/spamd/spamd.raw?rev=190364&r1=190363&r2=190364&view=diff
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Mon Jun 13 00:03:31 2005
@@ -970,6 +970,10 @@
 sub accept_a_conn {
   $client = $server->accept();
 
+  if ($scaling) {
+    $scaling->update_child_status_busy();
+  }
+
   # Bah!
   if ( !$client ) {
 
@@ -989,10 +993,6 @@
   }
 
   $client->autoflush(1);
-
-  if ($scaling) {
-    $scaling->update_child_status_busy();
-  }
 
   # keep track of start time
   my $start = time;

Added: spamassassin/trunk/t/spamd_ssl_accept_fail.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/spamd_ssl_accept_fail.t?rev=190364&view=auto
==============================================================================
--- spamassassin/trunk/t/spamd_ssl_accept_fail.t (added)
+++ spamassassin/trunk/t/spamd_ssl_accept_fail.t Mon Jun 13 00:03:31 2005
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+# bug 4107
+
+use lib '.'; use lib 't';
+use SATest; sa_t_init("spamd_ssl_accept_fail");
+use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 12);
+
+exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
+
+# ---------------------------------------------------------------------------
+
+%patterns = (
+
+q{ Return-Path: sb55sb55@yahoo.com}, 'firstline',
+q{ Subject: There yours for FREE!}, 'subj',
+q{ X-Spam-Status: Yes, score=}, 'status',
+q{ X-Spam-Flag: YES}, 'flag',
+q{ X-Spam-Level: **********}, 'stars',
+q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
+q{ NO_REAL_NAME}, 'noreal',
+q{ This must be the very last line}, 'lastline',
+
+
+);
+
+ok (start_spamd ("-L --ssl --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
+ok (spamcrun ("< data/spam/001", \&patterns_run_cb));
+ok (spamcrun ("-S < data/spam/001", \&patterns_run_cb));
+ok (stop_spamd ());
+
+ok_all_patterns();
+

Propchange: spamassassin/trunk/t/spamd_ssl_accept_fail.t
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message