mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
FS-3798 --resolve
This commit is contained in:
parent
bad8a69f18
commit
dd8e6089c7
@ -2468,6 +2468,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||||||
switch_channel_t *channel = NULL;
|
switch_channel_t *channel = NULL;
|
||||||
switch_event_t *revent = NULL;
|
switch_event_t *revent = NULL;
|
||||||
const char *var;
|
const char *var;
|
||||||
|
int locked = 1;
|
||||||
|
|
||||||
switch_mutex_lock(globals.listener_mutex);
|
switch_mutex_lock(globals.listener_mutex);
|
||||||
prefs.threads++;
|
prefs.threads++;
|
||||||
@ -2477,6 +2478,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||||||
|
|
||||||
if ((session = listener->session)) {
|
if ((session = listener->session)) {
|
||||||
if (switch_core_session_read_lock(session) != SWITCH_STATUS_SUCCESS) {
|
if (switch_core_session_read_lock(session) != SWITCH_STATUS_SUCCESS) {
|
||||||
|
locked = 0;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2655,7 +2657,9 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||||||
if (listener->session) {
|
if (listener->session) {
|
||||||
switch_channel_clear_flag(switch_core_session_get_channel(listener->session), CF_CONTROLLED);
|
switch_channel_clear_flag(switch_core_session_get_channel(listener->session), CF_CONTROLLED);
|
||||||
switch_clear_flag_locked(listener, LFLAG_SESSION);
|
switch_clear_flag_locked(listener, LFLAG_SESSION);
|
||||||
|
if (locked) {
|
||||||
switch_core_session_rwunlock(listener->session);
|
switch_core_session_rwunlock(listener->session);
|
||||||
|
}
|
||||||
} else if (listener->pool) {
|
} else if (listener->pool) {
|
||||||
switch_memory_pool_t *pool = listener->pool;
|
switch_memory_pool_t *pool = listener->pool;
|
||||||
switch_core_destroy_memory_pool(&pool);
|
switch_core_destroy_memory_pool(&pool);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user