]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Save module ctx for custom command.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 30 Apr 2014 15:10:31 +0000 (16:10 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 30 Apr 2014 15:10:31 +0000 (16:10 +0100)
src/libserver/worker_util.h
src/webui.c

index 2372375ba5f4b391dc9d2f0a93db410094d35603..2af32d1e82bf200b16d8c08a3affab5bb448a3ec 100644 (file)
@@ -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;
index 91bd9fe634e178e2dc1aa3664857717e1e5aba14..685e176043d7ec85113abb00a16042b8179d8657 100644 (file)
@@ -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