summaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-27 12:58:23 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-27 13:10:40 +0000
commit19f28d85479e4d0e97d15f8ad05890c01fd033f3 (patch)
tree872e6e6ae0ee02bd76a2e36107e5f0b1893c582b /src/controller.c
parent424ac722959351c8332e185e36fb7daddff24faf (diff)
downloadrspamd-19f28d85479e4d0e97d15f8ad05890c01fd033f3.tar.gz
rspamd-19f28d85479e4d0e97d15f8ad05890c01fd033f3.zip
Add ability to insert documentation strings
Issue: #461
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c136
1 files changed, 95 insertions, 41 deletions
diff --git a/src/controller.c b/src/controller.c
index f16bf42a0..68ce74a3a 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -34,6 +34,8 @@
#include "libutil/rrd.h"
#include "unix-std.h"
#include <math.h>
+#include <tclDecls.h>
+#include <curses.h>
/* 60 seconds for worker's IO */
#define DEFAULT_WORKER_IO_TIMEOUT 60000
@@ -2263,47 +2265,99 @@ init_controller_worker (struct rspamd_config *cfg)
ctx->timeout = DEFAULT_WORKER_IO_TIMEOUT;
- rspamd_rcl_register_worker_option (cfg, type, "password",
- rspamd_rcl_parse_struct_string, ctx,
- G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, password), 0);
-
- rspamd_rcl_register_worker_option (cfg, type, "enable_password",
- rspamd_rcl_parse_struct_string, ctx,
- G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, enable_password), 0);
-
- rspamd_rcl_register_worker_option (cfg, type, "ssl",
- rspamd_rcl_parse_struct_boolean, ctx,
- G_STRUCT_OFFSET (struct rspamd_controller_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_controller_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_controller_worker_ctx, ssl_key), 0);
- rspamd_rcl_register_worker_option (cfg, type, "timeout",
- rspamd_rcl_parse_struct_time, ctx,
- G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx,
- timeout), RSPAMD_CL_FLAG_TIME_INTEGER);
-
- rspamd_rcl_register_worker_option (cfg, type, "secure_ip",
- rspamd_rcl_parse_struct_string_list, ctx,
- G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, secure_ip), 0);
-
- rspamd_rcl_register_worker_option (cfg, type, "static_dir",
- rspamd_rcl_parse_struct_string, ctx,
- G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx,
- static_files_dir), 0);
-
- rspamd_rcl_register_worker_option (cfg, type, "keypair",
- rspamd_rcl_parse_struct_keypair, ctx,
- G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx,
- key), 0);
-
- rspamd_rcl_register_worker_option (cfg, type, "stats_path",
- rspamd_rcl_parse_struct_string, ctx,
- G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, saved_stats_path), 0);
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "password",
+ rspamd_rcl_parse_struct_string,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, password),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "enable_password",
+ rspamd_rcl_parse_struct_string,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx,
+ enable_password),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "ssl",
+ rspamd_rcl_parse_struct_boolean,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, use_ssl),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "ssl_cert",
+ rspamd_rcl_parse_struct_string,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, ssl_cert),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "ssl_key",
+ rspamd_rcl_parse_struct_string,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, ssl_key),
+ 0,
+ NULL);
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "timeout",
+ rspamd_rcl_parse_struct_time,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx,
+ timeout),
+ RSPAMD_CL_FLAG_TIME_INTEGER,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "secure_ip",
+ rspamd_rcl_parse_struct_string_list,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx, secure_ip),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "static_dir",
+ rspamd_rcl_parse_struct_string,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx,
+ static_files_dir),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "keypair",
+ rspamd_rcl_parse_struct_keypair,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx,
+ key),
+ 0,
+ NULL);
+
+ rspamd_rcl_register_worker_option (cfg,
+ type,
+ "stats_path",
+ rspamd_rcl_parse_struct_string,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_controller_worker_ctx,
+ saved_stats_path),
+ 0,
+ NULL);
return ctx;
}