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;
|
||||
void * value;
|
||||
switch_hash_index_t *iter;
|
||||
/* event used to track sessions to remove */
|
||||
switch_event_t *event = NULL;
|
||||
switch_event_header_t *header = 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);
|
||||
if (status != SWITCH_STATUS_SUCCESS) {
|
||||
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);
|
||||
continue;
|
||||
}
|
||||
|
@ -650,6 +652,10 @@ static switch_status_t check_attached_sessions(listener_t *listener)
|
|||
}
|
||||
|
||||
switch_thread_rwlock_unlock(listener->session_rwlock);
|
||||
|
||||
/* remove the temporary event */
|
||||
switch_event_destroy(&event);
|
||||
|
||||
if (prefs.done) {
|
||||
return SWITCH_STATUS_FALSE; /* we're shutting down */
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue