GList *workers; /**< linked list of all workers params */
GHashTable *wrk_parsers; /**< hash for worker config parsers, indexed by worker quarks */
ucl_object_t *rcl_obj; /**< rcl object */
+ ucl_object_t *config_comments; /**< comments saved from the config */
ucl_object_t *doc_strings; /**< documentation strings for config options */
GHashTable * metrics; /**< hash of metrics indexed by metric name */
GList * metrics_list; /**< linked list of metrics */
rspamd_strlcpy (cfg->cfg_pool->tag.uid, cfg->checksum,
MIN (sizeof (cfg->cfg_pool->tag.uid), strlen (cfg->checksum)));
- parser = ucl_parser_new (0);
+ parser = ucl_parser_new (UCL_PARSER_SAVE_COMMENTS);
rspamd_ucl_add_conf_variables (parser, vars);
rspamd_ucl_add_conf_macros (parser, cfg);
munmap (data, st.st_size);
cfg->rcl_obj = ucl_parser_get_object (parser);
+ cfg->config_comments = ucl_object_ref (ucl_parser_get_comments (parser));
ucl_parser_free (parser);
top = rspamd_rcl_config_init (cfg);
rspamd_map_remove_all (cfg);
ucl_object_unref (cfg->rcl_obj);
+ ucl_object_unref (cfg->config_comments);
ucl_object_unref (cfg->doc_strings);
g_hash_table_remove_all (cfg->metrics);
g_hash_table_unref (cfg->metrics);