for (i = 0; i < (gint)cache->prefilters->len; i ++) {
item = g_ptr_array_index (cache->prefilters, i);
+ if (RSPAMD_TASK_IS_SKIPPED (task)) {
+ return TRUE;
+ }
+
if (!isset (checkpoint->processed_bits, item->id * 2) &&
!isset (checkpoint->processed_bits, item->id * 2 + 1)) {
/* Check priorities */
* we just save it for another pass
*/
for (i = 0; i < (gint)checkpoint->version; i ++) {
+ if (RSPAMD_TASK_IS_SKIPPED (task)) {
+ return TRUE;
+ }
+
item = g_ptr_array_index (checkpoint->order->d, i);
if (item->type & SYMBOL_TYPE_CLASSIFIER) {
saved_priority = G_MININT;
for (i = 0; i < (gint)cache->postfilters->len; i ++) {
+ if (RSPAMD_TASK_IS_SKIPPED (task)) {
+ return TRUE;
+ }
+
item = g_ptr_array_index (cache->postfilters, i);
if (!isset (checkpoint->processed_bits, item->id * 2) &&
if (task != NULL) {
+ if (RSPAMD_TASK_IS_SKIPPED (task)) {
+ /* Do not set pre-result for a skipped task */
+ return 0;
+ }
+
if (lua_type (L, 2) == LUA_TNUMBER) {
action = lua_tointeger (L, 2);
}