diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-09 16:32:01 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-09 16:32:01 +0000 |
commit | d257a152e58c268725735bf227cb1f9b0e2afeac (patch) | |
tree | 5126aba185ba9bcecf374cc093330d23f038bacf /cdr | |
parent | aef44ae6843332fca01ef3e34705f59806f8ceda (diff) |
Fix a few potential deadlocks in cdr_sqlite3_custom.
(also rename sample config to .sample)
Closes issue #11208, patch by Laureano.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89130 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rw-r--r-- | cdr/cdr_sqlite3_custom.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cdr/cdr_sqlite3_custom.c b/cdr/cdr_sqlite3_custom.c index 26ec6ff19..a3ca00a4e 100644 --- a/cdr/cdr_sqlite3_custom.c +++ b/cdr/cdr_sqlite3_custom.c @@ -94,6 +94,7 @@ static int load_config(int reload) if (!(mappingvar = ast_variable_browse(cfg, "master"))) { /* nothing configured */ + ast_mutex_unlock(&lock); ast_config_destroy(cfg); return 0; } @@ -113,6 +114,7 @@ static int load_config(int reload) else { ast_log(LOG_WARNING, "%s: Column names not specified. Module not loaded.\n", name); + ast_mutex_unlock(&lock); ast_config_destroy(cfg); return -1; } @@ -122,6 +124,7 @@ static int load_config(int reload) ast_copy_string(values, tmp, sizeof(values)); else { ast_log(LOG_WARNING, "%s: Values not specified. Module not loaded.\n", name); + ast_mutex_unlock(&lock); ast_config_destroy(cfg); return -1; } |