Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
be56bbb7
提交
be56bbb7
authored
5月 08, 2014
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
let relay work if its the only option
上级
31069f33
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
20 行增加
和
6 行删除
+20
-6
switch_rtp.c
src/switch_rtp.c
+20
-6
没有找到文件。
src/switch_rtp.c
浏览文件 @
be56bbb7
...
...
@@ -816,6 +816,8 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
int
ok
=
1
;
uint32_t
*
pri
=
NULL
;
int
is_rtcp
=
ice
==
&
rtp_session
->
rtcp_ice
;
uint32_t
elapsed
;
if
(
!
switch_rtp_ready
(
rtp_session
)
||
zstr
(
ice
->
user_ice
)
||
zstr
(
ice
->
ice_user
))
{
return
;
...
...
@@ -841,6 +843,12 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
}
if
(
!
rtp_session
->
last_stun
)
{
elapsed
=
0
;
}
else
{
elapsed
=
(
unsigned
int
)
((
switch_micro_time_now
()
-
rtp_session
->
last_stun
)
/
1000
);
}
end_buf
=
buf
+
((
sizeof
(
buf
)
>
packet
->
header
.
length
)
?
packet
->
header
.
length
:
sizeof
(
buf
));
rtp_session
->
last_stun
=
switch_micro_time_now
();
...
...
@@ -945,7 +953,6 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
if
(
ok
)
{
ice
->
missed_count
=
0
;
}
else
{
uint32_t
elapsed
=
(
unsigned
int
)
((
switch_micro_time_now
()
-
rtp_session
->
last_stun
)
/
1000
);
switch_rtp_ice_t
*
icep
[
2
]
=
{
&
rtp_session
->
ice
,
&
rtp_session
->
rtcp_ice
};
switch_port_t
port
=
0
;
char
*
host
=
NULL
;
...
...
@@ -1114,17 +1121,24 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
ice
->
missed_count
=
0
;
ice
->
rready
=
1
;
for
(
i
=
0
;
i
<=
ice
->
ice_params
->
cand_idx
;
i
++
)
{
if
(
ice
->
ice_params
->
cands
[
i
][
ice
->
proto
].
con_port
==
port
)
{
if
(
!
strcmp
(
ice
->
ice_params
->
cands
[
i
][
ice
->
proto
].
con_addr
,
host
)
&&
!
strcmp
(
ice
->
ice_params
->
cands
[
i
][
ice
->
proto
].
cand_type
,
"relay"
))
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_WARNING
,
"Skiping RELAY stun/%s/dtls port change from %s:%u to %s:%u
\n
"
,
is_rtcp
?
"rtcp"
:
"rtp"
,
host2
,
port2
,
host
,
port
);
if
(
elapsed
!=
0
&&
elapsed
<
5000
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_WARNING
,
"Skiping RELAY stun/%s/dtls port change from %s:%u to %s:%u
\n
"
,
is_rtcp
?
"rtcp"
:
"rtp"
,
host2
,
port2
,
host
,
port
);
goto
end
;
}
goto
end
;
break
;
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论