}
}
- if ((item->type & SYMBOL_TYPE_VIRTUAL) && item->parent != -1) {
+ if ((item->type & SYMBOL_TYPE_VIRTUAL) &&
+ !(item->type & SYMBOL_TYPE_SQUEEZED) && item->parent != -1) {
g_assert (item->parent < (gint)cache->items_by_id->len);
parent = g_ptr_array_index (cache->items_by_id, item->parent);
item->priority ++;
}
- if ((item->type & SYMBOL_TYPE_VIRTUAL) && item->parent != -1) {
+ if ((item->type & SYMBOL_TYPE_VIRTUAL) &&
+ !(item->type & SYMBOL_TYPE_SQUEEZED) && item->parent != -1) {
g_assert (item->parent < (gint)cache->items_by_id->len);
parent = g_ptr_array_index (cache->items_by_id, item->parent);
setbit (checkpoint->processed_bits, item->id * 2);
if (!item->enabled ||
+ (item->type & SYMBOL_TYPE_SQUEEZED) ||
(RSPAMD_TASK_IS_EMPTY (task) && !(item->type & SYMBOL_TYPE_EMPTY))) {
check = FALSE;
}
ucl_object_insert_key (obj, ucl_object_fromstring (item->symbol),
"symbol", 0, false);
- if ((item->type & SYMBOL_TYPE_VIRTUAL) && item->parent != -1) {
+ if ((item->type & SYMBOL_TYPE_VIRTUAL) &&
+ !(item->type & SYMBOL_TYPE_SQUEEZED) && item->parent != -1) {
g_assert (item->parent < (gint)cbd->cache->items_by_id->len);
parent = g_ptr_array_index (cbd->cache->items_by_id,
item->parent);
SYMBOL_TYPE_POSTFILTER = (1 << 10),
SYMBOL_TYPE_NOSTAT = (1 << 11), /* Skip as statistical symbol */
SYMBOL_TYPE_IDEMPOTENT = (1 << 12), /* Symbol cannot change metric */
+ SYMBOL_TYPE_SQUEEZED = (1 << 13), /* Symbol is squeezed inside Lua */
};
/**
if (strstr (str, "idempotent") != NULL) {
ret |= SYMBOL_TYPE_IDEMPOTENT;
}
+ if (strstr (str, "squeezed") != NULL) {
+ ret |= SYMBOL_TYPE_SQUEEZED;
+ }
}
return ret;