gdouble lim;
struct rspamd_symcache_item *cur_item;
guint items_inflight;
- guint last_elt;
struct symbols_cache_order *order;
};
saved_priority = G_MININT;
all_done = TRUE;
- for (i = checkpoint->last_elt; i < (gint)cache->prefilters->len; i ++) {
+ for (i = 0; i < (gint)cache->prefilters->len; i ++) {
item = g_ptr_array_index (cache->prefilters, i);
if (RSPAMD_TASK_IS_SKIPPED (task)) {
* priority filters to be processed
*/
checkpoint->pass = RSPAMD_CACHE_PASS_PREFILTERS;
- checkpoint->last_elt = i;
return TRUE;
}
if (all_done || stage == RSPAMD_TASK_STAGE_FILTERS) {
checkpoint->pass = RSPAMD_CACHE_PASS_FILTERS;
- checkpoint->last_elt = 0;
}
if (stage == RSPAMD_TASK_STAGE_FILTERS) {
- checkpoint->last_elt = 0;
-
return rspamd_symbols_cache_process_symbols (task, cache, stage);
}
*/
all_done = TRUE;
- for (i = checkpoint->last_elt; i < (gint)checkpoint->version; i ++) {
+ for (i = 0; i < (gint)checkpoint->version; i ++) {
if (RSPAMD_TASK_IS_SKIPPED (task)) {
return TRUE;
}
"resolved",
item->id, item->symbol);
- if (checkpoint->last_elt == 0) {
- checkpoint->last_elt = i;
- }
-
continue;
}
if (all_done || stage == RSPAMD_TASK_STAGE_POST_FILTERS) {
checkpoint->pass = RSPAMD_CACHE_PASS_POSTFILTERS;
- checkpoint->last_elt = 0;
}
if (stage == RSPAMD_TASK_STAGE_POST_FILTERS) {
- checkpoint->last_elt = 0;
return rspamd_symbols_cache_process_symbols (task, cache, stage);
}
saved_priority = G_MININT;
all_done = TRUE;
- for (i = checkpoint->last_elt; i < (gint)cache->postfilters->len; i ++) {
+ for (i = 0; i < (gint)cache->postfilters->len; i ++) {
if (RSPAMD_TASK_IS_SKIPPED (task)) {
return TRUE;
}
* priority filters to be processed
*/
checkpoint->pass = RSPAMD_CACHE_PASS_POSTFILTERS;
- checkpoint->last_elt = i;
return TRUE;
}
if (all_done) {
checkpoint->pass = RSPAMD_CACHE_PASS_IDEMPOTENT;
- checkpoint->last_elt = 0;
}
if (checkpoint->items_inflight == 0 ||
stage == RSPAMD_TASK_STAGE_IDEMPOTENT) {
checkpoint->pass = RSPAMD_CACHE_PASS_IDEMPOTENT;
- checkpoint->last_elt = 0;
}
if (stage == RSPAMD_TASK_STAGE_IDEMPOTENT) {
- checkpoint->last_elt = 0;
-
return rspamd_symbols_cache_process_symbols (task, cache, stage);
}
/* Check for postfilters */
saved_priority = G_MININT;
- for (i = checkpoint->last_elt; i < (gint)cache->idempotent->len; i ++) {
+ for (i = 0; i < (gint)cache->idempotent->len; i ++) {
item = g_ptr_array_index (cache->idempotent, i);
if (!CHECK_START_BIT (checkpoint, item) &&
* priority filters to be processed
*/
checkpoint->pass = RSPAMD_CACHE_PASS_IDEMPOTENT;
- checkpoint->last_elt = i;
return TRUE;
}