summaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-10-04 22:14:10 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-10-04 22:14:10 +0400
commit3789849b7b2e617d0a287fe77490b6643f3a6b74 (patch)
tree8415305aee39a3aad6adbccbc1941a62f3a41cf8 /src/controller.c
parent14e1129068d55bc8de0618832d4f7d33bb1b0f06 (diff)
downloadrspamd-3789849b7b2e617d0a287fe77490b6643f3a6b74.tar.gz
rspamd-3789849b7b2e617d0a287fe77490b6643f3a6b74.zip
* Add meta-classification example.
Many changes to advanced statistic and meta-classification logic. Add example of complex meta-classification.
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/controller.c b/src/controller.c
index c987bc15f..47d444317 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -488,11 +488,20 @@ process_stat_command (struct controller_session *session)
total = statfile_get_total_blocks (statfile);
statfile_get_revision (statfile, &rev, &ti);
if (total != (guint64)-1 && used != (guint64)-1) {
- r += rspamd_snprintf (out_buf + r, sizeof (out_buf) - r,
- "Statfile: %s (version %uL); length: %Hz; free blocks: %uL; total blocks: %uL; free: %.2f%%" CRLF,
- st->symbol, rev, st->size,
- (total - used), total,
- (double)((double)(total - used) / (double)total) * 100.);
+ if (st->label) {
+ r += rspamd_snprintf (out_buf + r, sizeof (out_buf) - r,
+ "Statfile: %s <%s> (version %uL); length: %Hz; free blocks: %uL; total blocks: %uL; free: %.2f%%" CRLF,
+ st->symbol, st->label, rev, st->size,
+ (total - used), total,
+ (double)((double)(total - used) / (double)total) * 100.);
+ }
+ else {
+ r += rspamd_snprintf (out_buf + r, sizeof (out_buf) - r,
+ "Statfile: %s (version %uL); length: %Hz; free blocks: %uL; total blocks: %uL; free: %.2f%%" CRLF,
+ st->symbol, rev, st->size,
+ (total - used), total,
+ (double)((double)(total - used) / (double)total) * 100.);
+ }
}
}
cur_st = g_list_next (cur_st);
@@ -1173,8 +1182,6 @@ fin_learn_task (void *arg)
if (task->state != WRITING_REPLY) {
task->state = WRITE_REPLY;
- /* Process all statfiles */
- process_statfiles (task);
}
/* Check if we have all events finished */