send the call's uniqueid, if any, as the first element of the event's parameter list.
unlock the session returned by core_session_locate like I should've been doing. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11019 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
386f0b9388
commit
b60cdc56c6
|
@ -271,6 +271,8 @@ static void remove_binding(listener_t *listener, erlang_pid *pid) {
|
|||
static void ei_encode_switch_event_headers(ei_x_buff *ebuf, switch_event_t *event)
|
||||
{
|
||||
int i;
|
||||
char *uuid = switch_event_get_header(event, "unique-id");
|
||||
|
||||
switch_event_header_t *hp;
|
||||
|
||||
for (i = 0, hp = event->headers; hp; hp = hp->next, i++);
|
||||
|
@ -278,7 +280,13 @@ static void ei_encode_switch_event_headers(ei_x_buff *ebuf, switch_event_t *even
|
|||
if (event->body)
|
||||
i++;
|
||||
|
||||
ei_x_encode_list_header(ebuf, i);
|
||||
ei_x_encode_list_header(ebuf, i+1);
|
||||
|
||||
if (uuid) {
|
||||
ei_x_encode_string(ebuf, switch_event_get_header(event, "unique-id"));
|
||||
} else {
|
||||
ei_x_encode_atom(ebuf, "undefined");
|
||||
}
|
||||
|
||||
for (hp = event->headers; hp; hp = hp->next) {
|
||||
ei_x_encode_tuple_header(ebuf, 2);
|
||||
|
@ -983,7 +991,9 @@ sendevent_fail:
|
|||
ei_x_encode_atom(rbuf, "error");
|
||||
ei_x_encode_atom(rbuf, "badmem");
|
||||
}
|
||||
/* switch_core_session_rwunlock(session); */ /* XXX is this needed? */
|
||||
|
||||
/* release the lock returned by switch_core_locate_session */
|
||||
switch_core_session_rwunlock(session);
|
||||
break;
|
||||
|
||||
sendmsg_fail:
|
||||
|
|
Loading…
Reference in New Issue