提交 618ea0f2 authored 作者: Andrew Thompson's avatar Andrew Thompson

FS-3488 --resolve

上级 0587e21c
...@@ -549,6 +549,7 @@ static switch_status_t check_attached_sessions(listener_t *listener) ...@@ -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) ...@@ -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) ...@@ -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 {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论