From: Vsevolod Stakhov Date: Wed, 30 Apr 2014 15:10:31 +0000 (+0100) Subject: Save module ctx for custom command. X-Git-Tag: 0.7.0~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b08a75fcc559ebc4872834ef1c70daa95e162b7;p=thirdparty%2Frspamd.git Save module ctx for custom command. --- diff --git a/src/libserver/worker_util.h b/src/libserver/worker_util.h index 2372375ba5..2af32d1e82 100644 --- a/src/libserver/worker_util.h +++ b/src/libserver/worker_util.h @@ -67,10 +67,12 @@ void rspamd_worker_stop_accept (struct rspamd_worker *worker); typedef gint (*rspamd_controller_func_t) ( struct rspamd_http_connection_entry *conn_ent, - struct rspamd_http_message *msg); + struct rspamd_http_message *msg, + struct module_ctx *ctx); struct rspamd_custom_controller_command { const gchar *command; + struct module_ctx *ctx; gboolean privilleged; gboolean require_message; rspamd_controller_func_t handler; diff --git a/src/webui.c b/src/webui.c index 91bd9fe634..685e176043 100644 --- a/src/webui.c +++ b/src/webui.c @@ -1483,7 +1483,7 @@ rspamd_webui_handle_custom (struct rspamd_http_connection_entry *conn_ent, return 0; } - return cmd->handler (conn_ent, msg); + return cmd->handler (conn_ent, msg, cmd->ctx); } static void