]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Stat: Set more sane default prefix when users scripts are set
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Feb 2019 11:13:36 +0000 (11:13 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Feb 2019 11:13:36 +0000 (11:13 +0000)
src/libstat/backends/redis_backend.c

index b003d5a27be53e02a78aa6040adc7cccd73bea96..10d348ac99f63dcc51942f7c910f30139bcd50a7 100644 (file)
@@ -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 {