mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-20 11:43:52 +00:00
Fix a few potential deadlocks in cdr_sqlite3_custom.
(also rename sample config to .sample) Closes issue #11208, patch by Laureano. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -94,6 +94,7 @@ static int load_config(int reload)
|
|||||||
|
|
||||||
if (!(mappingvar = ast_variable_browse(cfg, "master"))) {
|
if (!(mappingvar = ast_variable_browse(cfg, "master"))) {
|
||||||
/* nothing configured */
|
/* nothing configured */
|
||||||
|
ast_mutex_unlock(&lock);
|
||||||
ast_config_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -113,6 +114,7 @@ static int load_config(int reload)
|
|||||||
else {
|
else {
|
||||||
ast_log(LOG_WARNING, "%s: Column names not specified. Module not loaded.\n",
|
ast_log(LOG_WARNING, "%s: Column names not specified. Module not loaded.\n",
|
||||||
name);
|
name);
|
||||||
|
ast_mutex_unlock(&lock);
|
||||||
ast_config_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -122,6 +124,7 @@ static int load_config(int reload)
|
|||||||
ast_copy_string(values, tmp, sizeof(values));
|
ast_copy_string(values, tmp, sizeof(values));
|
||||||
else {
|
else {
|
||||||
ast_log(LOG_WARNING, "%s: Values not specified. Module not loaded.\n", name);
|
ast_log(LOG_WARNING, "%s: Values not specified. Module not loaded.\n", name);
|
||||||
|
ast_mutex_unlock(&lock);
|
||||||
ast_config_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user