update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8248 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2b5f3563a2
commit
540a2fecf8
|
@ -2298,23 +2298,26 @@ sofia_profile_t *sofia_glue_find_profile__(const char *file, const char *func, i
|
||||||
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
||||||
if ((profile = (sofia_profile_t *) switch_core_hash_find(mod_sofia_globals.profile_hash, key))) {
|
if ((profile = (sofia_profile_t *) switch_core_hash_find(mod_sofia_globals.profile_hash, key))) {
|
||||||
if (!(profile->pflags & PFLAG_RUNNING)) {
|
if (!(profile->pflags & PFLAG_RUNNING)) {
|
||||||
|
#ifdef SOFIA_DEBUG_RWLOCKS
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "Profile %s is not running\n", profile->name);
|
||||||
|
#endif
|
||||||
profile = NULL;
|
profile = NULL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (switch_thread_rwlock_tryrdlock(profile->rwlock) != SWITCH_STATUS_SUCCESS) {
|
if (switch_thread_rwlock_tryrdlock(profile->rwlock) != SWITCH_STATUS_SUCCESS) {
|
||||||
#ifdef SOFIA_DEBUG_RWLOCKS
|
#ifdef SOFIA_DEBUG_RWLOCKS
|
||||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "Profile %s is locked\n", profile->name);
|
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "Profile %s is locked\n", profile->name);
|
||||||
#endif
|
#endif
|
||||||
profile = NULL;
|
profile = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef SOFIA_DEBUG_RWLOCKS
|
#ifdef SOFIA_DEBUG_RWLOCKS
|
||||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "Profile %s is not in the hash\n", key);
|
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "Profile %s is not in the hash\n", key);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef SOFIA_DEBUG_RWLOCKS
|
#ifdef SOFIA_DEBUG_RWLOCKS
|
||||||
if (profile) {
|
if (profile) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "XXXXXXXXXXXXXX LOCK %s\n", profile->name);
|
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "XXXXXXXXXXXXXX LOCK %s\n", profile->name);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2328,7 +2331,7 @@ void sofia_glue_release_profile__(const char *file, const char *func, int line,
|
||||||
{
|
{
|
||||||
if (profile) {
|
if (profile) {
|
||||||
#ifdef SOFIA_DEBUG_RWLOCKS
|
#ifdef SOFIA_DEBUG_RWLOCKS
|
||||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "XXXXXXXXXXXXXX UNLOCK %s\n", profile->name);
|
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_ERROR, "XXXXXXXXXXXXXX UNLOCK %s\n", profile->name);
|
||||||
#endif
|
#endif
|
||||||
switch_thread_rwlock_unlock(profile->rwlock);
|
switch_thread_rwlock_unlock(profile->rwlock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue