diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-06-24 12:18:39 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-06-24 12:32:41 +0100 |
commit | 0c94fef8143f656efe800f47f63a42bc136208f9 (patch) | |
tree | 69b74b9ed4856c6c649a632ac8af2e879b6ee5e2 /src/libserver/fuzzy_backend_redis.c | |
parent | b08cb355816d56329343d3b8db7042d5067ec6aa (diff) | |
download | rspamd-0c94fef8143f656efe800f47f63a42bc136208f9.tar.gz rspamd-0c94fef8143f656efe800f47f63a42bc136208f9.zip |
[Minor] Allow to use numeric database when parsing redis params
Diffstat (limited to 'src/libserver/fuzzy_backend_redis.c')
-rw-r--r-- | src/libserver/fuzzy_backend_redis.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libserver/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend_redis.c index 9a6648d4d..f8bec8882 100644 --- a/src/libserver/fuzzy_backend_redis.c +++ b/src/libserver/fuzzy_backend_redis.c @@ -195,7 +195,12 @@ rspamd_fuzzy_backend_redis_try_ucl (struct rspamd_fuzzy_backend_redis *backend, elt = ucl_object_lookup_any (obj, "db", "database", "dbname", NULL); if (elt) { - backend->dbname = ucl_object_tostring (elt); + if (ucl_object_type (elt) == UCL_STRING) { + backend->dbname = ucl_object_tostring (elt); + } + else if (ucl_object_type (elt) == UCL_INT) { + backend->dbname = ucl_object_tostring_forced (elt); + } } else { backend->dbname = NULL; |