mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-14 12:19:27 +00:00
FS-10299 [mod_callcenter] Removing global lock on all cc_execute_sql functions when executing database queries
This commit is contained in:
parent
97cece8968
commit
faf87febdb
@ -601,8 +601,6 @@ char *cc_execute_sql2str(cc_queue_t *queue, switch_mutex_t *mutex, char *sql, ch
|
|||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_lock(mutex);
|
switch_mutex_lock(mutex);
|
||||||
} else {
|
|
||||||
switch_mutex_lock(globals.mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dbh = cc_get_db_handle())) {
|
if (!(dbh = cc_get_db_handle())) {
|
||||||
@ -617,8 +615,6 @@ end:
|
|||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_unlock(mutex);
|
switch_mutex_unlock(mutex);
|
||||||
} else {
|
|
||||||
switch_mutex_unlock(globals.mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -631,8 +627,6 @@ static switch_status_t cc_execute_sql(cc_queue_t *queue, char *sql, switch_mutex
|
|||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_lock(mutex);
|
switch_mutex_lock(mutex);
|
||||||
} else {
|
|
||||||
switch_mutex_lock(globals.mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dbh = cc_get_db_handle())) {
|
if (!(dbh = cc_get_db_handle())) {
|
||||||
@ -648,8 +642,6 @@ end:
|
|||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_unlock(mutex);
|
switch_mutex_unlock(mutex);
|
||||||
} else {
|
|
||||||
switch_mutex_unlock(globals.mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -663,8 +655,6 @@ static switch_bool_t cc_execute_sql_callback(cc_queue_t *queue, switch_mutex_t *
|
|||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_lock(mutex);
|
switch_mutex_lock(mutex);
|
||||||
} else {
|
|
||||||
switch_mutex_lock(globals.mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dbh = cc_get_db_handle())) {
|
if (!(dbh = cc_get_db_handle())) {
|
||||||
@ -685,8 +675,6 @@ end:
|
|||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
switch_mutex_unlock(mutex);
|
switch_mutex_unlock(mutex);
|
||||||
} else {
|
|
||||||
switch_mutex_unlock(globals.mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user