mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-23 04:14:47 +00:00
FS-3488 --resolve
This commit is contained in:
parent
0587e21c2b
commit
618ea0f2c8
@ -549,6 +549,7 @@ static switch_status_t check_attached_sessions(listener_t *listener)
|
|||||||
const void *key;
|
const void *key;
|
||||||
void * value;
|
void * value;
|
||||||
switch_hash_index_t *iter;
|
switch_hash_index_t *iter;
|
||||||
|
/* event used to track sessions to remove */
|
||||||
switch_event_t *event = NULL;
|
switch_event_t *event = NULL;
|
||||||
switch_event_header_t *header = NULL;
|
switch_event_header_t *header = NULL;
|
||||||
switch_event_create_subclass(&event, SWITCH_EVENT_CLONE, NULL);
|
switch_event_create_subclass(&event, SWITCH_EVENT_CLONE, NULL);
|
||||||
@ -570,6 +571,7 @@ static switch_status_t check_attached_sessions(listener_t *listener)
|
|||||||
status = notify_new_session(listener, sp);
|
status = notify_new_session(listener, sp);
|
||||||
if (status != SWITCH_STATUS_SUCCESS) {
|
if (status != SWITCH_STATUS_SUCCESS) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(sp->uuid_str), SWITCH_LOG_DEBUG, "Notifying new session failed\n");
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(sp->uuid_str), SWITCH_LOG_DEBUG, "Notifying new session failed\n");
|
||||||
|
/* mark this session for removal */
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "delete", (const char *) key);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "delete", (const char *) key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -650,6 +652,10 @@ static switch_status_t check_attached_sessions(listener_t *listener)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch_thread_rwlock_unlock(listener->session_rwlock);
|
switch_thread_rwlock_unlock(listener->session_rwlock);
|
||||||
|
|
||||||
|
/* remove the temporary event */
|
||||||
|
switch_event_destroy(&event);
|
||||||
|
|
||||||
if (prefs.done) {
|
if (prefs.done) {
|
||||||
return SWITCH_STATUS_FALSE; /* we're shutting down */
|
return SWITCH_STATUS_FALSE; /* we're shutting down */
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user