struct rspamd_task;
struct controller_session;
-struct html_content;
struct rspamd_image;
struct rspamd_archive;
UText utf_stripped_text; /* Used by libicu to represent the utf8 content */
GPtrArray *newlines; /**< positions of newlines in text, relative to content*/
- struct html_content *html;
+ void *html;
GList *exceptions; /**< list of offsets of urls */
struct rspamd_mime_part *mime_part;
rspamadm_lua_command_help (gboolean full_help,
const struct rspamadm_command *cmd)
{
- struct thread_entry *thread = lua_thread_pool_get_for_config (rspamd_main->cfg);
-
- lua_State *L = thread->lua_state;
-
gint table_idx = GPOINTER_TO_INT (cmd->command_data);
if (full_help) {
+ struct thread_entry *thread = lua_thread_pool_get_for_config (rspamd_main->cfg);
+ lua_State *L = thread->lua_state;
lua_rawgeti (L, LUA_REGISTRYINDEX, table_idx);
/* Function */
lua_pushstring (L, "handler");
if (lua_repl_thread_call (thread, 1, (void *)cmd, lua_thread_str_error_cb) != 0) {
exit (EXIT_FAILURE);
}
+
+ lua_settop (L, 0);
}
else {
+ lua_State *L = rspamd_main->cfg->lua_state;
lua_rawgeti (L, LUA_REGISTRYINDEX, table_idx);
lua_pushstring (L, "description");
lua_gettable (L, -2);
else {
printf (" %-18s %-60s\n", cmd->name, "no description available");
}
- }
- lua_settop (L, 0);
+ lua_settop (L, 0);
+ }
return NULL; /* Must be handled in rspamadm itself */
}