You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/02/10 03:13:54 UTC
svn commit: r376529 - /spamassassin/branches/3.1/masses/logs-to-c
Author: felicity
Date: Thu Feb 9 18:13:51 2006
New Revision: 376529
URL: http://svn.apache.org/viewcvs?rev=376529&view=rev
Log:
bug 4784: set defaults for logs-to-c before GetOptions() is called to avoid issues with values of 0 for threshold, etc.
Modified:
spamassassin/branches/3.1/masses/logs-to-c
Modified: spamassassin/branches/3.1/masses/logs-to-c
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/masses/logs-to-c?rev=376529&r1=376528&r2=376529&view=diff
==============================================================================
--- spamassassin/branches/3.1/masses/logs-to-c (original)
+++ spamassassin/branches/3.1/masses/logs-to-c Thu Feb 9 18:13:51 2006
@@ -20,15 +20,15 @@
use vars qw($opt_cffile $opt_count $opt_lambda $opt_threshold
$opt_spam $opt_ham $opt_fplog $opt_fnlog);
+$opt_cffile = "../rules";
+$opt_count = 0;
+$opt_threshold = 5;
+$opt_spam = 'spam.log';
+$opt_ham = 'ham.log';
+$opt_scoreset = 0;
+
GetOptions("cffile=s", "count", "lambda=f", "threshold=f", "spam=s",
"ham=s", "scoreset=i", "fplog=s", "fnlog=s");
-
-$opt_cffile ||= "../rules";
-$opt_count ||= 0;
-$opt_threshold ||= 5;
-$opt_spam ||= 'spam.log';
-$opt_ham ||= 'ham.log';
-$opt_scoreset = 0 if (!defined $opt_scoreset);
# If desired, report false positives and false negatives for analysis
if (defined $opt_fnlog) { open (FNLOG, ">$opt_fnlog"); }