Fix a couple minor bugs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11493 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d0900fb1d5
commit
9c83e491e0
|
@ -334,7 +334,7 @@ session_elem_t * find_session_elem_by_pid(listener_t *listener, erlang_pid *pid)
|
||||||
|
|
||||||
switch_mutex_lock(listener->session_mutex);
|
switch_mutex_lock(listener->session_mutex);
|
||||||
for (s = listener->session_list; s; s = s->next) {
|
for (s = listener->session_list; s; s = s->next) {
|
||||||
if (s->process.type == ERLANG_PID && ei_compare_pids(pid, &s->process.pid)) {
|
if (s->process.type == ERLANG_PID && !ei_compare_pids(pid, &s->process.pid)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1000,7 +1000,7 @@ session_elem_t* attach_call_to_spawned_process(listener_t* listener, char *modul
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "got pid!\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "got pid!\n");
|
||||||
|
|
||||||
ei_link(listener, pid, ei_self(listener->ec));
|
ei_link(listener, ei_self(listener->ec), pid);
|
||||||
|
|
||||||
session_element->process.type = ERLANG_PID;
|
session_element->process.type = ERLANG_PID;
|
||||||
memcpy(&session_element->process.pid, pid, sizeof(erlang_pid));
|
memcpy(&session_element->process.pid, pid, sizeof(erlang_pid));
|
||||||
|
|
Loading…
Reference in New Issue