commit af563a9: [Project] Remove obsoleted methods

Vsevolod Stakhov vsevolod at rspamd.com
Sat Apr 30 19:21:37 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-04-19 23:18:25 +0100
URL: https://github.com/rspamd/rspamd/commit/af563a9c416845d9b4c40dd07d5c038cb47495d3

[Project] Remove obsoleted methods

---
 src/libserver/rspamd_symcache.h | 45 -----------------------------------------
 src/lua/lua_config.c            | 31 ++--------------------------
 2 files changed, 2 insertions(+), 74 deletions(-)

diff --git a/src/libserver/rspamd_symcache.h b/src/libserver/rspamd_symcache.h
index 71cb6e285..62a4c8714 100644
--- a/src/libserver/rspamd_symcache.h
+++ b/src/libserver/rspamd_symcache.h
@@ -242,23 +242,6 @@ void rspamd_symcache_add_dependency (struct rspamd_symcache *cache,
 void rspamd_symcache_add_delayed_dependency (struct rspamd_symcache *cache,
 											 const gchar *from, const gchar *to);
 
-/**
- * Disable specific symbol in the cache
- * @param cache
- * @param symbol
- */
-void rspamd_symcache_disable_symbol_perm (struct rspamd_symcache *cache,
-										  const gchar *symbol,
-										  gboolean resolve_parent);
-
-/**
- * Enable specific symbol in the cache
- * @param cache
- * @param symbol
- */
-void rspamd_symcache_enable_symbol_perm (struct rspamd_symcache *cache,
-										 const gchar *symbol);
-
 /**
  * Get abstract callback data for a symbol (or its parent symbol)
  * @param cache cache object
@@ -540,34 +523,6 @@ const gchar* rspamd_symcache_item_name (struct rspamd_symcache_item *item);
  */
 const struct rspamd_symcache_item_stat *
 		rspamd_symcache_item_stat (struct rspamd_symcache_item *item);
-/**
- * Returns if an item is enabled (for virtual it also means that parent should be enabled)
- * @param item
- * @return
- */
-gboolean rspamd_symcache_item_is_enabled (struct rspamd_symcache_item *item);
-/**
- * Returns parent for virtual symbols (or NULL)
- * @param item
- * @return
- */
-struct rspamd_symcache_item * rspamd_symcache_item_get_parent (
-		struct rspamd_symcache_item *item);
-/**
- * Returns direct deps for an element
- * @param item
- * @return array of struct rspamd_symcache_item *
- */
-const GPtrArray* rspamd_symcache_item_get_deps (
-		struct rspamd_symcache_item *item);
-/**
- * Returns direct reverse deps for an element
- * @param item
- * @return array of struct rspamd_symcache_item *
- */
-const GPtrArray* rspamd_symcache_item_get_rdeps (
-		struct rspamd_symcache_item *item);
-
 
 /**
  * Enable profiling for task (e.g. when a slow rule has been found)
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index f9e6bf437..607b97174 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -2975,40 +2975,13 @@ lua_config_set_peak_cb (lua_State *L)
 static gint
 lua_config_enable_symbol (lua_State *L)
 {
-	LUA_TRACE_POINT;
-	struct rspamd_config *cfg = lua_check_config (L, 1);
-	const gchar *sym = luaL_checkstring (L, 2);
-
-	if (cfg && sym) {
-		rspamd_symcache_enable_symbol_perm (cfg->cache, sym);
-	}
-	else {
-		return luaL_error (L, "invalid arguments");
-	}
-
-	return 0;
+	return luaL_error (L, "obsoleted method");
 }
 
 static gint
 lua_config_disable_symbol (lua_State *L)
 {
-	LUA_TRACE_POINT;
-	struct rspamd_config *cfg = lua_check_config (L, 1);
-	const gchar *sym = luaL_checkstring (L, 2);
-	gboolean disable_parent = TRUE;
-
-	if (cfg && sym) {
-		if (lua_isboolean (L, 3)) {
-			disable_parent = lua_toboolean (L, 3);
-		}
-
-		rspamd_symcache_disable_symbol_perm (cfg->cache, sym, disable_parent);
-	}
-	else {
-		return luaL_error (L, "invalid arguments");
-	}
-
-	return 0;
+	return luaL_error (L, "obsoleted method");
 }
 
 static gint


More information about the Commits mailing list