]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Refactor] Use enum and pass lua_State through url_callback_data
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 14 Nov 2025 18:07:46 +0000 (18:07 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 14 Nov 2025 18:07:46 +0000 (18:07 +0000)
commit5502c602f18ef007070410adf7ae41c99e7d3193
tree191a8be840a632c59417f47f009376f507a3d053
parent9ebad076064c4639294e0e912f11c7f19ddf8aa2
[Refactor] Use enum and pass lua_State through url_callback_data

- Add enum rspamd_url_lua_filter_result for return values (ACCEPT/SUSPICIOUS/REJECT)
- Replace magic numbers (0/1/2) with enum constants throughout
- Add lua_state field to struct url_callback_data
- Pass lua_State through rspamd_url_find_multiple() chain
- Update all callers: task contexts pass task->cfg->lua_state, others pass NULL
- rspamd_url_trie_generic_callback_common now uses cb->lua_state
- More idiomatic C code with proper type safety
- lua_State now universally available where URL parsing happens
src/libserver/html/html.cxx
src/libserver/url.c
src/libserver/url.h