Skip to content

Commit

Permalink
[Project] Remove obsoleted methods
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Apr 19, 2022
1 parent 6859263 commit af563a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 74 deletions.
45 changes: 0 additions & 45 deletions src/libserver/rspamd_symcache.h
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
31 changes: 2 additions & 29 deletions src/lua/lua_config.c
Expand Up @@ -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
Expand Down

0 comments on commit af563a9

Please sign in to comment.