summaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2013-01-09 16:35:03 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2013-01-09 16:35:03 +0400
commit823c263b9d417a9d28344c469b253e0dfe76e640 (patch)
tree9b87cc08829c7a66c5b4181848da8baf53fba415 /src/controller.c
parent86d52c83c8cb219e503704e4ee762a7633431e36 (diff)
downloadrspamd-823c263b9d417a9d28344c469b253e0dfe76e640.tar.gz
rspamd-823c263b9d417a9d28344c469b253e0dfe76e640.zip
Add saving of actions, symbols and maps.
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/controller.c b/src/controller.c
index 20a733693..f633f5b01 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -532,6 +532,7 @@ process_dynamic_conf_command (gchar **cmd_args, struct controller_session *sessi
gchar *arg, *metric, *name, *err_str;
gdouble value;
gboolean res;
+ guint real_act;
if (cfg->dynamic_conf == NULL) {
if (!session->restful) {
@@ -589,7 +590,13 @@ process_dynamic_conf_command (gchar **cmd_args, struct controller_session *sessi
}
if (is_action) {
- res = add_dynamic_action (cfg, metric, name, value);
+ if (!check_action_str (name, &real_act)) {
+ msg_info ("invalid action string: %s", name);
+ res = FALSE;
+ }
+ else {
+ res = add_dynamic_action (cfg, metric, real_act, value);
+ }
}
else {
res = add_dynamic_symbol (cfg, metric, name, value);