aboutsummaryrefslogtreecommitdiffstats
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/cdr_mysql.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index a6d37b31d..a7894acdc 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -364,16 +364,16 @@ static int my_load_config_string(struct ast_config *cfg, const char *category, c
return -1;
}
+ tmp = ast_variable_retrieve(cfg, category, variable);
+
+ ast_str_set(field, 0, "%s", tmp ? tmp : def);
+
us->str = *field;
AST_LIST_LOCK(&unload_strings);
AST_LIST_INSERT_HEAD(&unload_strings, us, entry);
AST_LIST_UNLOCK(&unload_strings);
- tmp = ast_variable_retrieve(cfg, category, variable);
-
- ast_str_set(field, 0, "%s", tmp ? tmp : def);
-
return 0;
}