From 4eccdfef58a64652ae2a1f0a7a1f11ae55346420 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Fri, 21 Jan 2011 21:47:46 -0500 Subject: [PATCH] mod_erlang_event: Don't urlencode events (and destroy an event after use) --- src/mod/event_handlers/mod_erlang_event/ei_helpers.c | 1 + src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mod/event_handlers/mod_erlang_event/ei_helpers.c b/src/mod/event_handlers/mod_erlang_event/ei_helpers.c index a99b52074c..db4f7780e0 100644 --- a/src/mod/event_handlers/mod_erlang_event/ei_helpers.c +++ b/src/mod/event_handlers/mod_erlang_event/ei_helpers.c @@ -111,6 +111,7 @@ void ei_encode_switch_event_headers(ei_x_buff * ebuf, switch_event_t *event) for (hp = event->headers; hp; hp = hp->next) { ei_x_encode_tuple_header(ebuf, 2); _ei_x_encode_string(ebuf, hp->name); + switch_url_decode(hp->value); _ei_x_encode_string(ebuf, hp->value); } 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 8d3c594b75..1a8bd00790 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 @@ -532,6 +532,7 @@ static switch_status_t notify_new_session(listener_t *listener, session_elem_t * session_element->uuid_str); } + switch_event_destroy(&call_event); ei_x_free(&lbuf); return SWITCH_STATUS_SUCCESS; }