diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-21 17:08:16 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-21 17:08:16 +0000 |
commit | 1f5264224f1376d3095aef24ddf0638b18a10125 (patch) | |
tree | 1169e37c1d460cf2928ce7ddee898ef175fe5c64 /cdr | |
parent | 8e050d8258b47b4b986e04c08465e2f6be88b2f2 (diff) |
Reloading the config and having no changes still initialized some settings to 0. Initialize settings after doing all of the cfg checks.
(closes issue #13942)
Reported by: davidw
Patches:
cdr_diff.txt uploaded by otherwiseguy (license 396)
Tested by: davidw
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158374 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rw-r--r-- | cdr/cdr_csv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c index daad88871..0654bab59 100644 --- a/cdr/cdr_csv.c +++ b/cdr/cdr_csv.c @@ -96,16 +96,16 @@ static int load_config(int reload) const char *tmp; struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 }; - usegmtime = 0; - loguniqueid = 0; - loguserfield = 0; - if (!(cfg = ast_config_load(config, config_flags)) || cfg == CONFIG_STATUS_FILEINVALID) { ast_log(LOG_WARNING, "unable to load config: %s\n", config); return 0; } else if (cfg == CONFIG_STATUS_FILEUNCHANGED) return 1; + usegmtime = 0; + loguniqueid = 0; + loguserfield = 0; + if (!(var = ast_variable_browse(cfg, "csv"))) { ast_config_destroy(cfg); return 0; |