diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-09-30 17:17:10 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-09-30 17:17:10 +0100 |
commit | 61553772c71a32432c4cb0eaa9c23cc4fd4fc9f6 (patch) | |
tree | 6752a7490cac1f3cb22bb85492dfe8d11c53268b /src/webui.c | |
parent | 45ddc88eeecb8b35efdd7b0508642b2e3a39fabf (diff) | |
download | rspamd-61553772c71a32432c4cb0eaa9c23cc4fd4fc9f6.tar.gz rspamd-61553772c71a32432c4cb0eaa9c23cc4fd4fc9f6.zip |
Convert webui.
Diffstat (limited to 'src/webui.c')
-rw-r--r-- | src/webui.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/webui.c b/src/webui.c index 0a9542ddd..24271e0ab 100644 --- a/src/webui.c +++ b/src/webui.c @@ -93,7 +93,7 @@ #define COLOR_REJECT "#CB4B4B" #define COLOR_TOTAL "#9440ED" -gpointer init_webui_worker (void); +gpointer init_webui_worker (struct config_file *cfg); void start_webui_worker (struct rspamd_worker *worker); worker_t webui_worker = { @@ -1704,7 +1704,7 @@ http_handle_scan (struct evhttp_request *req, gpointer arg) gpointer -init_webui_worker (void) +init_webui_worker (struct config_file *cfg) { struct rspamd_webui_worker_ctx *ctx; GQuark type; @@ -1713,10 +1713,22 @@ init_webui_worker (void) ctx = g_malloc0 (sizeof (struct rspamd_webui_worker_ctx)); - register_worker_opt (type, "password", xml_handle_string, ctx, G_STRUCT_OFFSET (struct rspamd_webui_worker_ctx, password)); - register_worker_opt (type, "ssl", xml_handle_boolean, ctx, G_STRUCT_OFFSET (struct rspamd_webui_worker_ctx, use_ssl)); - register_worker_opt (type, "ssl_cert", xml_handle_string, ctx, G_STRUCT_OFFSET (struct rspamd_webui_worker_ctx, ssl_cert)); - register_worker_opt (type, "ssl_key", xml_handle_string, ctx, G_STRUCT_OFFSET (struct rspamd_webui_worker_ctx, ssl_key)); + rspamd_rcl_register_worker_option (cfg, type, "password", + rspamd_rcl_parse_struct_string, ctx, + G_STRUCT_OFFSET (struct rspamd_webui_worker_ctx, password), 0); + + rspamd_rcl_register_worker_option (cfg, type, "ssl", + rspamd_rcl_parse_struct_boolean, ctx, + G_STRUCT_OFFSET (struct rspamd_webui_worker_ctx, use_ssl), 0); + + rspamd_rcl_register_worker_option (cfg, type, "ssl_cert", + rspamd_rcl_parse_struct_string, ctx, + G_STRUCT_OFFSET (struct rspamd_webui_worker_ctx, ssl_cert), 0); + + rspamd_rcl_register_worker_option (cfg, type, "ssl_key", + rspamd_rcl_parse_struct_string, ctx, + G_STRUCT_OFFSET (struct rspamd_webui_worker_ctx, ssl_key), 0); + return ctx; } |