aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-22 23:00:11 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-22 23:00:11 +0100
commitce6490f17f7f3c9cc865a46e3df78f1d3d11a996 (patch)
treecc1848ffb36388576688af01ea5b86f2b6dd52af
parent98d22d8bd5da4c7aa427c1a62b05c026f7a202f8 (diff)
downloadrspamd-ce6490f17f7f3c9cc865a46e3df78f1d3d11a996.tar.gz
rspamd-ce6490f17f7f3c9cc865a46e3df78f1d3d11a996.zip
[Minor] Fix recursive add docs strings from the comments
-rw-r--r--src/libserver/cfg_rcl.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index ae6657064..75b222975 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -3883,9 +3883,17 @@ rspamd_rcl_add_doc_from_comments (struct rspamd_config *cfg,
ucl_object_type (cur), NULL, 0, NULL, FALSE);
}
- if (cur_doc && ucl_object_type (cur) == UCL_OBJECT) {
- rspamd_rcl_add_doc_from_comments (cfg, cur_doc, cur, comments,
- FALSE);
+ if (ucl_object_type (cur) == UCL_OBJECT) {
+ if (cur_doc) {
+ rspamd_rcl_add_doc_from_comments (cfg, cur_doc, cur,
+ comments,
+ FALSE);
+ }
+ else {
+ rspamd_rcl_add_doc_from_comments (cfg, top_doc, cur,
+ comments,
+ FALSE);
+ }
}
}
}