cleanup FS-3432

This commit is contained in:
Tamas Cseke 2012-06-08 17:24:23 +02:00
parent 19db96d2ba
commit ae4d3acbb3
2 changed files with 1 additions and 6 deletions

View File

@ -499,10 +499,8 @@ static switch_status_t handle_msg_setevent(listener_t *listener, erlang_msg *msg
switch_event_types_t type;
int i = 0;
/* TODO listener write lock */
/* clear any previous event registrations */
for( x = 0; x <= SWITCH_EVENT_ALL; x++){
for(x = 0; x <= SWITCH_EVENT_ALL; x++) {
event_list[x] = 0;
}
@ -566,14 +564,12 @@ static switch_status_t handle_msg_session_setevent(listener_t *listener, erlang_
switch_event_types_t type;
uint32_t x = 0;
/* TODO session write lock */
/* clear any previous event registrations */
for (x = 0; x <= SWITCH_EVENT_ALL; x++){
event_list[x] = 0;
}
/* create new hash */
/* TODO make thread safe*/
switch_core_hash_init(&event_hash, session->pool);
for (i = 1; i < arity; i++){

View File

@ -676,7 +676,6 @@ static switch_status_t check_attached_sessions(listener_t *listener)
switch_thread_rwlock_wrlock(listener->session_rwlock);
/* do the deferred remove */
/* TODO refactor find_session_elem_by_uuid*/
for (header = event->headers; header; header = header->next) {
if ((sp = (session_elem_t*)switch_core_hash_find(listener->sessions, header->value))) {
remove_session_elem_from_listener(listener, sp);