From aa2f34e98ad58ce6c67be857d6f166367bc5fe22 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Mon, 30 Mar 2009 21:10:01 +0000 Subject: [PATCH] Fixed registered process outbound mode (reported by rcpacheco) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12845 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c | 7 +++++-- 1 file changed, 5 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 48f53ad00a..8d1b3448f2 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 @@ -417,8 +417,10 @@ static switch_xml_t erlang_fetch(const char *sectionstr, const char *tag_name, c ei_get_type(rep->buff, &rep->index, &type, &size); - if (type != ERL_STRING_EXT && type != ERL_BINARY_EXT) /* XXX no unicode or character codes > 255 */ + if (type != ERL_STRING_EXT && type != ERL_BINARY_EXT) { /* XXX no unicode or character codes > 255 */ + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "XML fetch response contained non ASCII characters? (was type %d of size %d)\n", type, size); return NULL; + } if (!(xmlstr = malloc(size + 1))) { @@ -778,7 +780,7 @@ static void listener_main_loop(listener_t *listener) check_log_queue(listener); check_event_queue(listener); - if (SWITCH_STATUS_SUCCESS != check_attached_sessions(listener)) { + if (check_attached_sessions(listener) != SWITCH_STATUS_SUCCESS) { return; } } @@ -1038,6 +1040,7 @@ session_elem_t* attach_call_to_registered_process(listener_t* listener, char* re if (!(session_element = switch_core_session_alloc(session, sizeof(*session_element)))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to allocate session element\n"); } else { + memcpy(session_element->uuid_str, switch_core_session_get_uuid(session), SWITCH_UUID_FORMATTED_LENGTH); session_element->process.type = ERLANG_REG_PROCESS; session_element->process.reg_name = switch_core_strdup(switch_core_session_get_pool(session),reg_name); switch_set_flag(session_element, LFLAG_SESSION_ALIVE);