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

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1165 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 56f66b92
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <libdingaling.h> #include <libdingaling.h>
#define DL_CAND_WAIT 10000000 #define DL_CAND_WAIT 10000000
#define DL_CAND_INITIAL_WAIT 2000000
static const char modname[] = "mod_dingaling"; static const char modname[] = "mod_dingaling";
...@@ -237,9 +238,10 @@ static void *SWITCH_THREAD_FUNC negotiate_thread_run(switch_thread *thread, void ...@@ -237,9 +238,10 @@ static void *SWITCH_THREAD_FUNC negotiate_thread_run(switch_thread *thread, void
started = switch_time_now(); started = switch_time_now();
if (!tech_pvt->last_cand) {
if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
tech_pvt->last_cand = switch_time_now(); tech_pvt->last_cand = switch_time_now();
next_cand = tech_pvt->last_cand; next_cand = tech_pvt->last_cand + DL_CAND_INITIAL_WAIT;
} else { } else {
next_cand = tech_pvt->last_cand + DL_CAND_WAIT; next_cand = tech_pvt->last_cand + DL_CAND_WAIT;
} }
...@@ -343,7 +345,7 @@ static void *SWITCH_THREAD_FUNC negotiate_thread_run(switch_thread *thread, void ...@@ -343,7 +345,7 @@ static void *SWITCH_THREAD_FUNC negotiate_thread_run(switch_thread *thread, void
return NULL; return NULL;
} }
switch_yield(1000); switch_yield(1000);
//printf("WAIT %s %d %d %d\n", switch_channel_get_name(channel), switch_test_flag(tech_pvt, TFLAG_INIT), switch_test_flag(tech_pvt, TFLAG_CODEC_READY), switch_test_flag(tech_pvt, TFLAG_RTP_READY)); printf("WAIT %s %d %d %d\n", switch_channel_get_name(channel), switch_test_flag(tech_pvt, TFLAG_INIT), switch_test_flag(tech_pvt, TFLAG_CODEC_READY), switch_test_flag(tech_pvt, TFLAG_RTP_READY));
} }
......
...@@ -135,6 +135,7 @@ static void handle_ice(switch_rtp *rtp_session, void *data, switch_size_t len) ...@@ -135,6 +135,7 @@ static void handle_ice(switch_rtp *rtp_session, void *data, switch_size_t len)
packet = switch_stun_packet_parse(buf, sizeof(buf)); packet = switch_stun_packet_parse(buf, sizeof(buf));
rtp_session->last_stun = switch_time_now(); rtp_session->last_stun = switch_time_now();
switch_stun_packet_first_attribute(packet, attr); switch_stun_packet_first_attribute(packet, attr);
do { do {
...@@ -155,7 +156,7 @@ static void handle_ice(switch_rtp *rtp_session, void *data, switch_size_t len) ...@@ -155,7 +156,7 @@ static void handle_ice(switch_rtp *rtp_session, void *data, switch_size_t len)
} while (switch_stun_packet_next_attribute(attr)); } while (switch_stun_packet_next_attribute(attr));
if (packet->header.type == SWITCH_STUN_BINDING_REQUEST && !strcmp(rtp_session->user_ice, username)) { if (packet->header.type == SWITCH_STUN_BINDING_REQUEST) {// && !strcmp(rtp_session->user_ice, username)) {
uint8_t buf[512]; uint8_t buf[512];
switch_stun_packet_t *rpacket; switch_stun_packet_t *rpacket;
char *remote_ip; char *remote_ip;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论