aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/redis_backend.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-11 11:13:36 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-11 11:13:36 +0000
commit334d21b2d5da3144f7117d8a0448746353db1a24 (patch)
treebca959237aa30ae3aa3e1fa31a43d9696e1042e6 /src/libstat/backends/redis_backend.c
parentbc660a5fd9c237327c435705298898f68b57cb2e (diff)
downloadrspamd-334d21b2d5da3144f7117d8a0448746353db1a24.tar.gz
rspamd-334d21b2d5da3144f7117d8a0448746353db1a24.zip
[Minor] Stat: Set more sane default prefix when users scripts are set
Diffstat (limited to 'src/libstat/backends/redis_backend.c')
-rw-r--r--src/libstat/backends/redis_backend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index b003d5a27..10d348ac9 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -1310,7 +1310,7 @@ rspamd_redis_parse_classifier_opts (struct redis_stat_ctx *backend,
elt = ucl_object_lookup (obj, "prefix");
if (elt == NULL || ucl_object_type (elt) != UCL_STRING) {
/* Default non-users statistics */
- if (backend->enable_users && backend->cbref_user == -1) {
+ if (backend->enable_users || backend->cbref_user != -1) {
backend->redis_object = REDIS_DEFAULT_USERS_OBJECT;
}
else {