From: Vsevolod Stakhov Date: Thu, 23 May 2013 16:35:33 +0000 (+0100) Subject: Fix call to get statfile's revision. X-Git-Tag: 0.5.5~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56beefcbe41276328a062f1eee7d0c31cd98e5b9;p=thirdparty%2Frspamd.git Fix call to get statfile's revision. --- diff --git a/src/classifiers/bayes.c b/src/classifiers/bayes.c index 0b4e03ec41..2a8ae44c72 100644 --- a/src/classifiers/bayes.c +++ b/src/classifiers/bayes.c @@ -202,7 +202,7 @@ bayes_classify (struct classifier_ctx* ctx, statfile_pool_t *pool, GTree *input, gchar *value; gint nodes, i = 0, selected_st = -1, cnt; gint minnodes; - guint64 maxhits = 0; + guint64 maxhits = 0, rev; double final_prob, h, s; struct statfile *st; stat_file_t *file; @@ -263,11 +263,12 @@ bayes_classify (struct classifier_ctx* ctx, statfile_pool_t *pool, GTree *input, } data.statfiles[i].file = file; data.statfiles[i].st = st; + statfile_get_revision (file, &rev, NULL); if (st->is_spam) { - data.total_spam += statfile_get_revision (file); + data.total_spam += rev; } else { - data.total_ham += statfile_get_revision (file); + data.total_ham += rev; } cur = g_list_next (cur);