if (mutex) {
switch_mutex_lock(mutex);
+ } else {
+ switch_mutex_lock(globals.mutex);
}
if (!(dbh = cc_get_db_handle())) {
if (mutex) {
switch_mutex_unlock(mutex);
+ } else {
+ switch_mutex_unlock(globals.mutex);
}
return ret;
if (mutex) {
switch_mutex_lock(mutex);
+ } else {
+ switch_mutex_lock(globals.mutex);
}
if (!(dbh = cc_get_db_handle())) {
if (mutex) {
switch_mutex_unlock(mutex);
+ } else {
+ switch_mutex_unlock(globals.mutex);
}
return status;
if (mutex) {
switch_mutex_lock(mutex);
+ } else {
+ switch_mutex_lock(globals.mutex);
}
if (!(dbh = cc_get_db_handle())) {
if (mutex) {
switch_mutex_unlock(mutex);
+ } else {
+ switch_mutex_unlock(globals.mutex);
}
return ret;