From 9c83e491e0f807821d9c4035afb92a082975f478 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Mon, 26 Jan 2009 20:50:17 +0000 Subject: [PATCH] Fix a couple minor bugs git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11493 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c index 268787bcf7..db1852fcbf 100644 --- a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c +++ b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c @@ -334,7 +334,7 @@ session_elem_t * find_session_elem_by_pid(listener_t *listener, erlang_pid *pid) switch_mutex_lock(listener->session_mutex); 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; } } @@ -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"); - ei_link(listener, pid, ei_self(listener->ec)); + ei_link(listener, ei_self(listener->ec), pid); session_element->process.type = ERLANG_PID; memcpy(&session_element->process.pid, pid, sizeof(erlang_pid));