diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-12 13:48:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-12 13:48:33 +0100 |
commit | 6b1be1eb125756d77b64b249af5739e6e52644ed (patch) | |
tree | 1a04dfe305c9467818f9fbdecdab769384790314 /src/libserver/cfg_rcl.c | |
parent | e2600fef6aac4e838871783e41ab934ab43e2e5b (diff) | |
download | rspamd-6b1be1eb125756d77b64b249af5739e6e52644ed.tar.gz rspamd-6b1be1eb125756d77b64b249af5739e6e52644ed.zip |
[Feature] Add description to the groups
Issue: #2985
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r-- | src/libserver/cfg_rcl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index 5b67a5f61..ba1b614a0 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -329,6 +329,7 @@ rspamd_rcl_group_handler (rspamd_mempool_t *pool, const ucl_object_t *obj, const ucl_object_t *val, *elt; struct rspamd_rcl_section *subsection; struct rspamd_rcl_symbol_data sd; + const gchar *description = NULL; g_assert (key != NULL); @@ -388,6 +389,14 @@ rspamd_rcl_group_handler (rspamd_mempool_t *pool, const ucl_object_t *obj, } } + elt = ucl_object_lookup (obj, "description"); + if (elt) { + description = ucl_object_tostring (elt); + + gr->description = rspamd_mempool_strdup (cfg->cfg_pool, + description); + } + sd.gr = gr; sd.cfg = cfg; |