FS-10299 [mod_callcenter] Removing global lock on all cc_execute_sql functions when executing database queries

This commit is contained in:
Italo Rossi 2017-05-09 11:44:30 -03:00 committed by Mike Jerris
parent 3ecddca30e
commit 5ffe9d8c64
1 changed files with 0 additions and 12 deletions

View File

@ -587,8 +587,6 @@ char *cc_execute_sql2str(cc_queue_t *queue, switch_mutex_t *mutex, char *sql, ch
if (mutex) {
switch_mutex_lock(mutex);
} else {
switch_mutex_lock(globals.mutex);
}
if (!(dbh = cc_get_db_handle())) {
@ -603,8 +601,6 @@ end:
if (mutex) {
switch_mutex_unlock(mutex);
} else {
switch_mutex_unlock(globals.mutex);
}
return ret;
@ -617,8 +613,6 @@ static switch_status_t cc_execute_sql(cc_queue_t *queue, char *sql, switch_mutex
if (mutex) {
switch_mutex_lock(mutex);
} else {
switch_mutex_lock(globals.mutex);
}
if (!(dbh = cc_get_db_handle())) {
@ -634,8 +628,6 @@ end:
if (mutex) {
switch_mutex_unlock(mutex);
} else {
switch_mutex_unlock(globals.mutex);
}
return status;
@ -649,8 +641,6 @@ static switch_bool_t cc_execute_sql_callback(cc_queue_t *queue, switch_mutex_t *
if (mutex) {
switch_mutex_lock(mutex);
} else {
switch_mutex_lock(globals.mutex);
}
if (!(dbh = cc_get_db_handle())) {
@ -671,8 +661,6 @@ end:
if (mutex) {
switch_mutex_unlock(mutex);
} else {
switch_mutex_unlock(globals.mutex);
}
return ret;