@@ -563,7 +563,6 @@ ENDIF(NOT DESTDIR) | |||
################################ SUBDIRS SECTION ########################### | |||
ADD_SUBDIRECTORY(contrib/hiredis) | |||
SET(WITH_HIREDIS 1) | |||
INCLUDE_DIRECTORIES(BEFORE "${CMAKE_SOURCE_DIR}/contrib/hiredis") | |||
LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}") |
@@ -107,7 +107,6 @@ | |||
#cmakedefine PARAM_H_HAS_BITSET 1 | |||
#cmakedefine WITH_DB 1 | |||
#cmakedefine WITH_GPERF_TOOLS 1 | |||
#cmakedefine WITH_HIREDIS 1 | |||
#cmakedefine WITH_HYPERSCAN 1 | |||
#cmakedefine WITH_JEMALLOC 1 | |||
#cmakedefine WITH_LUA 1 |
@@ -269,9 +269,7 @@ rspamd_config_new (enum rspamd_config_init_flags flags) | |||
cfg->images_cache_size = 256; | |||
cfg->monitored_ctx = rspamd_monitored_ctx_init (); | |||
cfg->neighbours = ucl_object_typed_new (UCL_OBJECT); | |||
#ifdef WITH_HIREDIS | |||
cfg->redis_pool = rspamd_redis_pool_init (); | |||
#endif | |||
cfg->default_max_shots = DEFAULT_MAX_SHOTS; | |||
cfg->max_sessions_cache = DEFAULT_MAX_SESSIONS; | |||
cfg->maps_cache_dir = rspamd_mempool_strdup (cfg->cfg_pool, RSPAMD_DBDIR); | |||
@@ -345,11 +343,9 @@ rspamd_config_free (struct rspamd_config *cfg) | |||
lua_close (cfg->lua_state); | |||
} | |||
#ifdef WITH_HIREDIS | |||
if (cfg->redis_pool) { | |||
rspamd_redis_pool_destroy (cfg->redis_pool); | |||
} | |||
#endif | |||
rspamd_upstreams_library_unref (cfg->ups_ctx); | |||
HASH_CLEAR (hh, cfg->actions); |
@@ -87,7 +87,6 @@ static const struct rspamd_fuzzy_backend_subr fuzzy_subrs[] = { | |||
.periodic = rspamd_fuzzy_backend_expire_sqlite, | |||
.close = rspamd_fuzzy_backend_close_sqlite, | |||
}, | |||
#ifdef WITH_HIREDIS | |||
[RSPAMD_FUZZY_BACKEND_REDIS] = { | |||
.init = rspamd_fuzzy_backend_init_redis, | |||
.check = rspamd_fuzzy_backend_check_redis, | |||
@@ -98,7 +97,6 @@ static const struct rspamd_fuzzy_backend_subr fuzzy_subrs[] = { | |||
.periodic = rspamd_fuzzy_backend_expire_redis, | |||
.close = rspamd_fuzzy_backend_close_redis, | |||
} | |||
#endif | |||
}; | |||
struct rspamd_fuzzy_backend { |
@@ -486,10 +486,8 @@ rspamd_prepare_worker (struct rspamd_worker *worker, const char *name, | |||
rspamd_worker_init_signals (worker, event_loop); | |||
rspamd_control_worker_add_default_cmd_handlers (worker, event_loop); | |||
rspamd_worker_heartbeat_start (worker, event_loop); | |||
#ifdef WITH_HIREDIS | |||
rspamd_redis_pool_config (worker->srv->cfg->redis_pool, | |||
worker->srv->cfg, event_loop); | |||
#endif | |||
/* Accept all sockets */ | |||
if (hdl) { |
@@ -115,13 +115,8 @@ struct rspamd_stat_backend { | |||
RSPAMD_STAT_BACKEND_DEF(mmaped_file); | |||
RSPAMD_STAT_BACKEND_DEF(sqlite3); | |||
RSPAMD_STAT_BACKEND_DEF(cdb); | |||
#ifdef WITH_HIREDIS | |||
RSPAMD_STAT_BACKEND_DEF(redis); | |||
#endif | |||
#ifdef __cplusplus | |||
} | |||
#endif |
@@ -19,8 +19,6 @@ | |||
#include "upstream.h" | |||
#include "lua/lua_common.h" | |||
#include "libserver/mempool_vars_internal.h" | |||
#ifdef WITH_HIREDIS | |||
#include "hiredis.h" | |||
#include "adapters/libev.h" | |||
#include "ref.h" | |||
@@ -2061,5 +2059,3 @@ rspamd_redis_load_tokenizer_config (gpointer runtime, | |||
{ | |||
return NULL; | |||
} | |||
#endif |
@@ -70,13 +70,8 @@ struct rspamd_stat_cache { | |||
void rspamd_stat_cache_##name##_close (gpointer ctx) | |||
RSPAMD_STAT_CACHE_DEF(sqlite3); | |||
#ifdef WITH_HIREDIS | |||
RSPAMD_STAT_CACHE_DEF(redis); | |||
#endif | |||
#ifdef __cplusplus | |||
} | |||
#endif |
@@ -91,9 +91,7 @@ static struct rspamd_stat_backend stat_backends[] = { | |||
RSPAMD_STAT_BACKEND_ELT(mmap, mmaped_file), | |||
RSPAMD_STAT_BACKEND_ELT(sqlite3, sqlite3), | |||
RSPAMD_STAT_BACKEND_ELT_READONLY(cdb, cdb), | |||
#ifdef WITH_HIREDIS | |||
RSPAMD_STAT_BACKEND_ELT(redis, redis) | |||
#endif | |||
}; | |||
#define RSPAMD_STAT_CACHE_ELT(nam, eltn) { \ | |||
@@ -107,9 +105,7 @@ static struct rspamd_stat_backend stat_backends[] = { | |||
static struct rspamd_stat_cache stat_caches[] = { | |||
RSPAMD_STAT_CACHE_ELT(sqlite3, sqlite3), | |||
#ifdef WITH_HIREDIS | |||
RSPAMD_STAT_CACHE_ELT(redis, redis), | |||
#endif | |||
}; | |||
void |
@@ -89,7 +89,6 @@ static const struct luaL_reg redislib_m[] = { | |||
#define REDIS_RELEASE REF_RELEASE | |||
#endif | |||
#ifdef WITH_HIREDIS | |||
struct lua_redis_request_specific_userdata; | |||
/** | |||
* Struct for userdata representation | |||
@@ -1612,67 +1611,6 @@ lua_redis_exec (lua_State *L) | |||
} | |||
} | |||
} | |||
#else | |||
static int | |||
lua_redis_make_request (lua_State *L) | |||
{ | |||
msg_warn ("rspamd is compiled with no redis support"); | |||
lua_pushboolean (L, FALSE); | |||
return 1; | |||
} | |||
static int | |||
lua_redis_make_request_sync (lua_State *L) | |||
{ | |||
msg_warn ("rspamd is compiled with no redis support"); | |||
lua_pushboolean (L, FALSE); | |||
return 1; | |||
} | |||
static int | |||
lua_redis_connect (lua_State *L) | |||
{ | |||
msg_warn ("rspamd is compiled with no redis support"); | |||
lua_pushboolean (L, FALSE); | |||
return 1; | |||
} | |||
static int | |||
lua_redis_connect_sync (lua_State *L) | |||
{ | |||
msg_warn ("rspamd is compiled with no redis support"); | |||
lua_pushboolean (L, FALSE); | |||
return 1; | |||
} | |||
static int | |||
lua_redis_add_cmd (lua_State *L) | |||
{ | |||
msg_warn ("rspamd is compiled with no redis support"); | |||
lua_pushboolean (L, FALSE); | |||
return 1; | |||
} | |||
static int | |||
lua_redis_exec (lua_State *L) | |||
{ | |||
msg_warn ("rspamd is compiled with no redis support"); | |||
lua_pushboolean (L, FALSE); | |||
return 1; | |||
} | |||
static int | |||
lua_redis_gc (lua_State *L) | |||
{ | |||
return 0; | |||
} | |||
#endif | |||
static gint | |||
lua_load_redis (lua_State * L) |
@@ -488,10 +488,7 @@ main (gint argc, gchar **argv, gchar **env) | |||
rspamd_lua_set_globals (cfg, L); | |||
rspamadm_add_lua_globals (resolver); | |||
#ifdef WITH_HIREDIS | |||
rspamd_redis_pool_config (cfg->redis_pool, cfg, rspamd_main->event_loop); | |||
#endif | |||
/* Init rspamadm global */ | |||
lua_newtable (L); |