|
|
|
|
|
|
|
|
const gchar *symbol_name, *param; |
|
|
const gchar *symbol_name, *param; |
|
|
struct rspamd_metric_result *metric_res; |
|
|
struct rspamd_metric_result *metric_res; |
|
|
struct rspamd_symbol_result *s = NULL; |
|
|
struct rspamd_symbol_result *s = NULL; |
|
|
struct rspamd_symbol_option *opt; |
|
|
|
|
|
double weight; |
|
|
double weight; |
|
|
gint i, top; |
|
|
gint i, top; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (s) { |
|
|
if (s) { |
|
|
|
|
|
metric_res->score -= s->score; |
|
|
s->score = weight; |
|
|
s->score = weight; |
|
|
|
|
|
metric_res->score += s->score; |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
return luaL_error (L, "symbol not found: %s", symbol_name); |
|
|
return luaL_error (L, "symbol not found: %s", symbol_name); |