aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/sqlite3_backend.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-16 09:59:52 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-16 09:59:52 +0000
commit6bc5286496c43a0ee9f1a616507c7aa03e28450c (patch)
tree9a6ed4374aaf129777560ba58f608368fb8754df /src/libstat/backends/sqlite3_backend.c
parent153e64677902c1acc7a1e8ee21d5b634d8a65885 (diff)
downloadrspamd-6bc5286496c43a0ee9f1a616507c7aa03e28450c.tar.gz
rspamd-6bc5286496c43a0ee9f1a616507c7aa03e28450c.zip
Refactor UCL API
Diffstat (limited to 'src/libstat/backends/sqlite3_backend.c')
-rw-r--r--src/libstat/backends/sqlite3_backend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c
index 0ea172125..9d582e063 100644
--- a/src/libstat/backends/sqlite3_backend.c
+++ b/src/libstat/backends/sqlite3_backend.c
@@ -523,9 +523,9 @@ rspamd_sqlite3_init (struct rspamd_stat_ctx *ctx,
struct rspamd_stat_sqlite3_db *bk;
GError *err = NULL;
- filenameo = ucl_object_find_key (stf->opts, "filename");
+ filenameo = ucl_object_lookup (stf->opts, "filename");
if (filenameo == NULL || ucl_object_type (filenameo) != UCL_STRING) {
- filenameo = ucl_object_find_key (stf->opts, "path");
+ filenameo = ucl_object_lookup (stf->opts, "path");
if (filenameo == NULL || ucl_object_type (filenameo) != UCL_STRING) {
msg_err_config ("statfile %s has no filename defined", stf->symbol);
return NULL;
@@ -543,7 +543,7 @@ rspamd_sqlite3_init (struct rspamd_stat_ctx *ctx,
bk->L = cfg->lua_state;
- users_enabled = ucl_object_find_any_key (clf->opts, "per_user",
+ users_enabled = ucl_object_lookup_any (clf->opts, "per_user",
"users_enabled", NULL);
if (users_enabled != NULL) {
if (ucl_object_type (users_enabled) == UCL_BOOLEAN) {
@@ -576,7 +576,7 @@ rspamd_sqlite3_init (struct rspamd_stat_ctx *ctx,
bk->enable_users = FALSE;
}
- lang_enabled = ucl_object_find_any_key (clf->opts,
+ lang_enabled = ucl_object_lookup_any (clf->opts,
"per_language", "languages_enabled", NULL);
if (lang_enabled != NULL) {