ソースを参照

Merge pull request #4932 from rspamd/vstakhov-fix-bayes-disable

Fix statfile symbols disabling
pull/4935/head
Vsevolod Stakhov 1ヶ月前
コミット
d24265cb62
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更12行の追加0行の削除
  1. 12
    0
      src/libstat/stat_process.c

+ 12
- 0
src/libstat/stat_process.c ファイルの表示

@@ -329,6 +329,18 @@ rspamd_stat_preprocess(struct rspamd_stat_ctx *st_ctx,
g_ptr_array_index(task->stat_runtimes, i) = NULL;
msg_debug_bayes("symbol %s is disabled, skip classification",
st->stcf->symbol);
/* We need to disable the whole classifier for this! */
struct rspamd_classifier *cl = st->classifier;
for (int j = 0; j < st_ctx->statfiles->len; j++) {
struct rspamd_statfile *nst = g_ptr_array_index(st_ctx->statfiles, j);

if (st != nst && nst->classifier == cl) {
g_ptr_array_index(task->stat_runtimes, j) = NULL;
msg_debug_bayes("symbol %s is disabled, skip classification for %s as well",
st->stcf->symbol, nst->stcf->symbol);
}
}

continue;
}


読み込み中…
キャンセル
保存