diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-19 17:57:13 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-19 17:57:13 +0000 |
commit | 3f00d108df7c99edd5cb45e34d232a80e159caa3 (patch) | |
tree | 1095abc2ae37c9020eeb3ea7af2b87cd16f3c1de /src/rspamadm | |
parent | b13907192f14c0a5171b225c21ffbcedfec3d501 (diff) | |
download | rspamd-3f00d108df7c99edd5cb45e34d232a80e159caa3.tar.gz rspamd-3f00d108df7c99edd5cb45e34d232a80e159caa3.zip |
[Project] Adopt plugins, workers, rspamadm and rspamc for http_context
Diffstat (limited to 'src/rspamadm')
-rw-r--r-- | src/rspamadm/control.c | 8 | ||||
-rw-r--r-- | src/rspamadm/lua_repl.c | 5 | ||||
-rw-r--r-- | src/rspamadm/rspamadm.c | 1 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/rspamadm/control.c b/src/rspamadm/control.c index 554392e63..c030907f6 100644 --- a/src/rspamadm/control.c +++ b/src/rspamadm/control.c @@ -234,13 +234,13 @@ rspamadm_control (gint argc, gchar **argv, const struct rspamadm_command *_cmd) exit (1); } - conn = rspamd_http_connection_new (NULL, + conn = rspamd_http_connection_new ( + NULL, /* Default context */ + NULL, rspamd_control_error_handler, rspamd_control_finish_handler, RSPAMD_HTTP_CLIENT_SIMPLE, - RSPAMD_HTTP_CLIENT, - NULL, - NULL); + RSPAMD_HTTP_CLIENT); msg = rspamd_http_new_message (HTTP_REQUEST); msg->url = rspamd_fstring_new_init (path, strlen (path)); double_to_tv (timeout, &tv); diff --git a/src/rspamadm/lua_repl.c b/src/rspamadm/lua_repl.c index 6248f2aa2..e91bd34fa 100644 --- a/src/rspamadm/lua_repl.c +++ b/src/rspamadm/lua_repl.c @@ -808,8 +808,9 @@ rspamadm_lua (gint argc, gchar **argv, const struct rspamadm_command *cmd) ctx = g_malloc0 (sizeof (*ctx)); http = rspamd_http_router_new (rspamadm_lua_error_handler, rspamadm_lua_finish_handler, - NULL, ev_base, - NULL, NULL); + NULL, + NULL, + rspamd_main->http_ctx); ctx->L = L; ctx->rt = http; rspamd_http_router_add_path (http, diff --git a/src/rspamadm/rspamadm.c b/src/rspamadm/rspamadm.c index ef52af1e3..c0bb4bc72 100644 --- a/src/rspamadm/rspamadm.c +++ b/src/rspamadm/rspamadm.c @@ -436,6 +436,7 @@ main (gint argc, gchar **argv, gchar **env) (void) dns_resolver_init (rspamd_main->logger, rspamd_main->ev_base, cfg); + rspamd_main->http_ctx = rspamd_http_context_create (cfg, rspamd_main->ev_base); g_log_set_default_handler (rspamd_glib_log_function, rspamd_main->logger); g_set_printerr_handler (rspamd_glib_printerr_function); |