From 19f28d85479e4d0e97d15f8ad05890c01fd033f3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 27 Dec 2015 12:58:23 +0000 Subject: Add ability to insert documentation strings Issue: #461 --- src/http_proxy.c | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) (limited to 'src/http_proxy.c') diff --git a/src/http_proxy.c b/src/http_proxy.c index 43cacae9c..eebd5c91e 100644 --- a/src/http_proxy.c +++ b/src/http_proxy.c @@ -22,6 +22,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +#include #include "config.h" #include "libutil/util.h" #include "libutil/map.h" @@ -203,20 +205,41 @@ init_http_proxy (struct rspamd_config *cfg) ctx->rotate_tm = DEFAULT_ROTATION_TIME; ctx->cfg = cfg; - rspamd_rcl_register_worker_option (cfg, type, "timeout", - rspamd_rcl_parse_struct_time, ctx, - G_STRUCT_OFFSET (struct http_proxy_ctx, - timeout), RSPAMD_CL_FLAG_TIME_FLOAT); - rspamd_rcl_register_worker_option (cfg, type, "rotate", - rspamd_rcl_parse_struct_time, ctx, - G_STRUCT_OFFSET (struct http_proxy_ctx, - rotate_tm), RSPAMD_CL_FLAG_TIME_FLOAT); - rspamd_rcl_register_worker_option (cfg, type, "keypair", - rspamd_rcl_parse_struct_keypair, ctx, - G_STRUCT_OFFSET (struct http_proxy_ctx, - key), 0); - rspamd_rcl_register_worker_option (cfg, type, "upstream", - http_proxy_parse_upstream, ctx, 0, 0); + rspamd_rcl_register_worker_option (cfg, + type, + "timeout", + rspamd_rcl_parse_struct_time, + ctx, + G_STRUCT_OFFSET (struct http_proxy_ctx, + timeout), + RSPAMD_CL_FLAG_TIME_FLOAT, + NULL); + rspamd_rcl_register_worker_option (cfg, + type, + "rotate", + rspamd_rcl_parse_struct_time, + ctx, + G_STRUCT_OFFSET (struct http_proxy_ctx, + rotate_tm), + RSPAMD_CL_FLAG_TIME_FLOAT, + NULL); + rspamd_rcl_register_worker_option (cfg, + type, + "keypair", + rspamd_rcl_parse_struct_keypair, + ctx, + G_STRUCT_OFFSET (struct http_proxy_ctx, + key), + 0, + NULL); + rspamd_rcl_register_worker_option (cfg, + type, + "upstream", + http_proxy_parse_upstream, + ctx, + 0, + 0, + NULL); return ctx; } -- cgit v1.2.3