diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-09-30 17:30:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-09-30 17:30:03 +0100 |
commit | 085a720344b7019a1d44b356388e7ec009e1e0e4 (patch) | |
tree | a24808c52e9fdae58c9dfffd114eacc4acdf9bac /src/controller.c | |
parent | 486f0cdddcd8170913429e14094233299e9c4106 (diff) | |
download | rspamd-085a720344b7019a1d44b356388e7ec009e1e0e4.tar.gz rspamd-085a720344b7019a1d44b356388e7ec009e1e0e4.zip |
Adopt fuzzy storage and controller.
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/controller.c b/src/controller.c index 2459d3a7d..f8335b8ec 100644 --- a/src/controller.c +++ b/src/controller.c @@ -50,7 +50,7 @@ #define CONTROLLER_RRD_STEP 60 /* Init functions */ -gpointer init_controller (void); +gpointer init_controller (struct config_file *cfg); void start_controller (struct rspamd_worker *worker); worker_t controller_worker = { @@ -1887,7 +1887,7 @@ controller_update_rrd (gint fd, short what, void *arg) } gpointer -init_controller (void) +init_controller (struct config_file *cfg) { struct rspamd_controller_ctx *ctx; GQuark type; @@ -1897,8 +1897,13 @@ init_controller (void) ctx->timeout = CONTROLLER_IO_TIMEOUT * 1000; - register_worker_opt (type, "password", xml_handle_string, ctx, G_STRUCT_OFFSET (struct rspamd_controller_ctx, password)); - register_worker_opt (type, "timeout", xml_handle_seconds, ctx, G_STRUCT_OFFSET (struct rspamd_controller_ctx, timeout)); + rspamd_rcl_register_worker_option (cfg, type, "password", + rspamd_rcl_parse_struct_string, ctx, + G_STRUCT_OFFSET (struct rspamd_controller_ctx, password), 0); + + rspamd_rcl_register_worker_option (cfg, type, "timeout", + rspamd_rcl_parse_struct_time, ctx, + G_STRUCT_OFFSET (struct rspamd_controller_ctx, timeout), RSPAMD_CL_FLAG_TIME_UINT_32); return ctx; } |