struct metric_result {
struct metric *metric; /**< pointer to metric structure */
double score; /**< total score */
- enum rspamd_metric_action action; /**< the current action */
+ double required_score; /**< real required score */
+ double grow_factor; /**< current grow factor */
GHashTable *symbols; /**< symbols of metric */
GHashTable *sym_groups; /**< groups of symbols */
gboolean checked; /**< whether metric result is consolidated */
- double grow_factor; /**< current grow factor */
+ enum rspamd_metric_action action; /**< the current action */
};
/**
enum rspamd_metric_action action = METRIC_ACTION_NOACTION;
ucl_object_t *obj = NULL, *sobj;;
gpointer h, v;
- double required_score;
const gchar *subject;
m = mres->metric;
mres->action = rspamd_check_action_metric (task, mres->score,
- &required_score, m);
+ &mres->required_score, m);
action = mres->action;
is_spam = (action == METRIC_ACTION_REJECT);
"is_skipped", 0, false);
ucl_object_insert_key (obj, ucl_object_fromdouble (mres->score),
"score", 0, false);
- ucl_object_insert_key (obj, ucl_object_fromdouble (required_score),
+ ucl_object_insert_key (obj, ucl_object_fromdouble (mres->required_score),
"required_score", 0, false);
ucl_object_insert_key (obj,
ucl_object_fromstring (rspamd_action_to_str (action)),