summaryrefslogtreecommitdiffstats
path: root/src/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-24 12:46:41 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-24 12:46:41 +0300
commite894cd18cf4ce43dc63c71fecb69efd7e25e68f9 (patch)
tree0f6fcfbf734f979bb4f9d99b7e3e75a4592002b4 /src/cfg_utils.c
parentc79b5ccd22cbc1c273479f4f88189a18effda533 (diff)
downloadrspamd-e894cd18cf4ce43dc63c71fecb69efd7e25e68f9.tar.gz
rspamd-e894cd18cf4ce43dc63c71fecb69efd7e25e68f9.zip
* Fix variable substitution
* Add new command line parameter '-V' allowing to dump all variables of rspamd
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r--src/cfg_utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index 037f23754..1dce0ee07 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -407,11 +407,13 @@ static void
substitute_all_variables (gpointer key, gpointer value, gpointer data)
{
struct config_file *cfg = (struct config_file *)data;
- char *var;
+ char *new;
- var = value;
/* Do recursive substitution */
- var = substitute_variable (cfg, var, 1);
+ new = substitute_variable (cfg, (char *)value, 1);
+ if (new != value) {
+ g_hash_table_replace (cfg->variables, key, new);
+ }
}
static void