提交 fd7bf0ea authored 作者: Michael Jerris's avatar Michael Jerris

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1171 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 c69c7416
......@@ -237,6 +237,7 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
ldl_session_t *session = NULL;
ldl_signal_t signal = LDL_SIGNAL_NONE;
char *initiator = iks_find_attrib(xml, "initiator");
char *msg = NULL;
if (!(session = apr_hash_get(handle->sessions, id, APR_HASH_KEY_STRING))) {
ldl_session_create(&session, handle, id, from, initiator);
......@@ -261,10 +262,13 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
iks *tag;
if (type) {
if (!strcasecmp(type, "initiate") || !strcasecmp(type, "accept")) {
signal = LDL_SIGNAL_INITIATE;
if (!strcasecmp(type, "accept")) {
msg = "accept";
}
if (!session->initiator && initiator) {
session->initiator = apr_pstrdup(session->pool, initiator);
}
......@@ -382,7 +386,7 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
}
if (handle->session_callback && signal) {
handle->session_callback(handle, session, signal, NULL);
handle->session_callback(handle, session, signal, msg);
}
return LDL_STATUS_SUCCESS;
......
......@@ -155,8 +155,8 @@ static void handle_ice(switch_rtp *rtp_session, void *data, switch_size_t len)
}
} while (switch_stun_packet_next_attribute(attr));
if (packet->header.type == SWITCH_STUN_BINDING_REQUEST) {// && !strcmp(rtp_session->user_ice, username)) {
//printf("[%s] [%s] [%s]\n", rtp_session->user_ice, username, !strcmp(rtp_session->user_ice, username) ? "yes" : "no");
if ((packet->header.type == SWITCH_STUN_BINDING_REQUEST) && !strcmp(rtp_session->user_ice, username)) {
uint8_t buf[512];
switch_stun_packet_t *rpacket;
char *remote_ip;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论