diff options
Diffstat (limited to 'src/libserver/composites.c')
-rw-r--r-- | src/libserver/composites.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libserver/composites.c b/src/libserver/composites.c index 8f3cb179d..83f3a35d4 100644 --- a/src/libserver/composites.c +++ b/src/libserver/composites.c @@ -66,7 +66,7 @@ struct symbol_remove_data { static rspamd_expression_atom_t * rspamd_composite_expr_parse (const gchar *line, gsize len, rspamd_mempool_t *pool, gpointer ud, GError **err); -static gdouble rspamd_composite_expr_process (gpointer input, rspamd_expression_atom_t *atom); +static gdouble rspamd_composite_expr_process (struct rspamd_expr_process_data *process_data, rspamd_expression_atom_t *atom); static gint rspamd_composite_expr_priority (rspamd_expression_atom_t *atom); static void rspamd_composite_expr_destroy (rspamd_expression_atom_t *atom); static void composites_foreach_callback (gpointer key, gpointer value, void *data); @@ -173,9 +173,9 @@ rspamd_composite_process_single_symbol (struct composites_data *cd, } static gdouble -rspamd_composite_expr_process (gpointer input, rspamd_expression_atom_t *atom) +rspamd_composite_expr_process (struct rspamd_expr_process_data *process_data, rspamd_expression_atom_t *atom) { - struct composites_data *cd = (struct composites_data *)input; + struct composites_data *cd = process_data->cd; const gchar *beg = atom->data, *sym = NULL; gchar t; struct symbol_remove_data *rd, *nrd; @@ -344,8 +344,13 @@ composites_foreach_callback (gpointer key, gpointer value, void *data) return; } - rc = rspamd_process_expression (comp->expr, - RSPAMD_EXPRESSION_FLAG_NOOPT, cd); + struct rspamd_expr_process_data process_data; + memset (&process_data, 0, sizeof process_data); + + process_data.flags = RSPAMD_EXPRESSION_FLAG_NOOPT; + process_data.cd = cd; + + rc = rspamd_process_expression (comp->expr, &process_data); /* Checked bit */ setbit (cd->checked, comp->id * 2); |