aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_cfg_file.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-10-22 17:04:20 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-10-22 17:04:20 +0100
commitb7a0873dac545a79778133152a9b6d9b4e47cc42 (patch)
treed389696b986920f8e8f66df01519f6f6d55a02b5 /src/lua/lua_cfg_file.c
parent41e269801406c374a041da0fd0c6b4eff6ba4f3d (diff)
downloadrspamd-b7a0873dac545a79778133152a9b6d9b4e47cc42.tar.gz
rspamd-b7a0873dac545a79778133152a9b6d9b4e47cc42.zip
Replace RCL to UCL from libucl to avoid duplicity in the code.
Diffstat (limited to 'src/lua/lua_cfg_file.c')
-rw-r--r--src/lua/lua_cfg_file.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lua/lua_cfg_file.c b/src/lua/lua_cfg_file.c
index 4f7a3bca5..0e22ec8f2 100644
--- a/src/lua/lua_cfg_file.c
+++ b/src/lua/lua_cfg_file.c
@@ -125,7 +125,7 @@ lua_post_load_config (struct config_file *cfg)
const gchar *name, *val;
gchar *sym;
struct expression *expr, *old_expr;
- rspamd_cl_object_t *obj;
+ ucl_object_t *obj;
gsize keylen;
/* First check all module options that may be overriden in 'config' global */
@@ -140,10 +140,7 @@ lua_post_load_config (struct config_file *cfg)
if (name != NULL && lua_istable (L, -1)) {
obj = lua_rcl_obj_get (L, -1);
if (obj != NULL) {
- obj->key = memory_pool_alloc (cfg->cfg_pool, keylen + 1);
- memcpy (obj->key, name, keylen);
- obj->key[keylen] = '\0';
- HASH_ADD_KEYPTR (hh, cfg->rcl_obj->value.ov, obj->key, keylen, obj);
+ cfg->rcl_obj = ucl_object_insert_key (cfg->rcl_obj, obj, name, keylen, true);
}
}
}