commit 648608c: Revert "[Feature] Ppopagate monitored errors from rbl module"
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Mar 18 10:42:10 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-03-18 10:40:04 +0000
URL: https://github.com/rspamd/rspamd/commit/648608c4971da3e57eaa5855919e0300f3d92ff6 (HEAD -> master)
Revert "[Feature] Ppopagate monitored errors from rbl module"
This reverts commit e4f459ef31aed15751edd9ae77f6183b7da3b7b4.
---
src/libserver/monitored.c | 2 +-
src/libserver/monitored.h | 8 --------
src/lua/lua_config.c | 19 -------------------
src/plugins/lua/rbl.lua | 3 ---
4 files changed, 1 insertion(+), 31 deletions(-)
diff --git a/src/libserver/monitored.c b/src/libserver/monitored.c
index 14c0137e0..7743d1d7b 100644
--- a/src/libserver/monitored.c
+++ b/src/libserver/monitored.c
@@ -98,7 +98,7 @@ struct rspamd_monitored {
INIT_LOG_MODULE(monitored)
-inline void
+static inline void
rspamd_monitored_propagate_error (struct rspamd_monitored *m,
const gchar *error)
{
diff --git a/src/libserver/monitored.h b/src/libserver/monitored.h
index ce259d176..2453a8f48 100644
--- a/src/libserver/monitored.h
+++ b/src/libserver/monitored.h
@@ -148,14 +148,6 @@ void rspamd_monitored_stop (struct rspamd_monitored *m);
*/
void rspamd_monitored_start (struct rspamd_monitored *m);
-/**
- * Propagate external monitored error
- * @param m
- * @param error
- */
-void rspamd_monitored_propagate_error (struct rspamd_monitored *m,
- const gchar *error);
-
/**
* Destroy monitored context and all monitored objects inside
* @param ctx
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index fdc572d9d..f42ca268e 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -912,14 +912,12 @@ LUA_FUNCTION_DEF (monitored, alive);
LUA_FUNCTION_DEF (monitored, latency);
LUA_FUNCTION_DEF (monitored, offline);
LUA_FUNCTION_DEF (monitored, total_offline);
-LUA_FUNCTION_DEF (monitored, propagate_error);
static const struct luaL_reg monitoredlib_m[] = {
LUA_INTERFACE_DEF (monitored, alive),
LUA_INTERFACE_DEF (monitored, latency),
LUA_INTERFACE_DEF (monitored, offline),
LUA_INTERFACE_DEF (monitored, total_offline),
- LUA_INTERFACE_DEF (monitored, propagate_error),
{"__tostring", rspamd_lua_class_tostring},
{NULL, NULL}
};
@@ -4633,23 +4631,6 @@ lua_monitored_latency (lua_State *L)
return 1;
}
-static gint
-lua_monitored_propagate_error (lua_State *L)
-{
- LUA_TRACE_POINT;
- struct rspamd_monitored *m = lua_check_monitored (L, 1);
- const gchar *what = luaL_checkstring (L, 2);
-
- if (m && what) {
- rspamd_monitored_propagate_error (m, what);
- }
- else {
- return luaL_error (L, "invalid arguments");
- }
-
- return 0;
-}
-
void
luaopen_config (lua_State * L)
{
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index fcda1727f..f476932b0 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -228,9 +228,6 @@ local function rbl_dns_process(task, rbl, to_resolve, results, err, resolve_tabl
rspamd_logger.infox(task, 'error looking up %s: %s', to_resolve, err)
task:insert_result(rbl.symbol .. '_FAIL', 1, string.format('%s:%s',
resolve_table_elt.orig, err))
- if rbl.monitored then
- rbl.monitored:propagate_error(err)
- end
return
end
More information about the Commits
mailing list