for (i = rt->start_pos; i < rt->end_pos; i++) {
res = &g_array_index (node->results, struct rspamd_token_result, i);
- if (res->st_runtime->st->is_spam) {
- res->value ++;
- }
- else if (res->value > 0) {
- /* Unlearning */
- res->value --;
+ if (res->st_runtime) {
+ if (res->st_runtime->st->is_spam) {
+ res->value ++;
+ }
+ else if (res->value > 0) {
+ /* Unlearning */
+ res->value --;
+ }
}
}
for (i = rt->start_pos; i < rt->end_pos; i++) {
res = &g_array_index (node->results, struct rspamd_token_result, i);
- if (!res->st_runtime->st->is_spam) {
- res->value ++;
- }
- else if (res->value > 0) {
- res->value --;
+ if (res->st_runtime) {
+ if (!res->st_runtime->st->is_spam) {
+ res->value ++;
+ }
+ else if (res->value > 0) {
+ res->value --;
+ }
}
}
g_tree_nnodes (cbdata->tok->tokens),
cl_runtime->clcf->min_tokens);
cur = g_list_next (cur);
+ cl_runtime->skipped = TRUE;
+
continue;
}
cl_run = (struct rspamd_classifier_runtime *)cur->data;
cl_run->stage = RSPAMD_STAT_STAGE_POST;
+ if (cl_run->skipped) {
+ cur = g_list_next (cur);
+ continue;
+ }
+
if (cl_run->cl) {
if (cl_ctx != NULL) {
if (cl_run->cl->classify_func (cl_ctx, cl_run->tok->tokens,
while (cur) {
cl_run = (struct rspamd_classifier_runtime *)cur->data;
- if (cl_run->cl) {
+ if (cl_run->cl && !cl_run->skipped) {
cl_ctx = cl_run->cl->init_func (task->task_pool, cl_run->clcf);
if (cl_ctx != NULL) {