void
rspamd_make_composites (struct rspamd_task *task)
{
- if (task->result) {
+ if (task->result && !RSPAMD_TASK_IS_SKIPPED (task)) {
composites_metric_callback (task->result, task);
}
}
if (COMPARE_CMD (p, MSG_CMD_PING, pathlen)) {
msg_debug_protocol ("got ping command");
task->cmd = CMD_PING;
+ task->flags |= RSPAMD_TASK_FLAG_SKIP;
+ task->processed_stages |= RSPAMD_TASK_STAGE_DONE; /* Skip all */
}
else if (COMPARE_CMD (p, MSG_CMD_PROCESS, pathlen)) {
msg_debug_protocol ("got process -> old check command");
struct rspamd_symcache_item *item;
struct rspamd_symcache_dynamic_item *dyn_item;
+ if (task->checkpoint == NULL) {
+ return;
+ }
+
PTR_ARRAY_FOREACH (cache->composites, i, item) {
dyn_item = rspamd_symcache_get_dynamic (task->checkpoint, item);