Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
90d3cb63
提交
90d3cb63
authored
1月 22, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix media reload on verto and sip re-invites
上级
062ddcfa
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
18 行增加
和
9 行删除
+18
-9
switch_core_media.c
src/switch_core_media.c
+5
-3
switch_rtp.c
src/switch_rtp.c
+13
-6
没有找到文件。
src/switch_core_media.c
浏览文件 @
90d3cb63
...
...
@@ -3916,7 +3916,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
const
char
*
rm_encoding
;
const
switch_codec_implementation_t
*
mimp
=
NULL
;
int
vmatch
=
0
,
i
;
nm_idx
=
0
;
m_idx
=
0
;
memset
(
matches
,
0
,
sizeof
(
matches
[
0
])
*
MAX_MATCHES
);
...
...
@@ -3991,7 +3991,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
if
(
!
(
rm_encoding
=
map
->
rm_encoding
))
{
rm_encoding
=
""
;
}
for
(
i
=
0
;
i
<
total_codecs
;
i
++
)
{
const
switch_codec_implementation_t
*
imp
=
codec_array
[
i
];
...
...
@@ -4078,7 +4078,8 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
pmap
->
rm_fmtp
=
switch_core_session_strdup
(
session
,
(
char
*
)
map
->
rm_fmtp
);
pmap
->
agreed_pt
=
(
switch_payload_t
)
map
->
rm_pt
;
smh
->
negotiated_codecs
[
smh
->
num_negotiated_codecs
++
]
=
mimp
;
#if 0
if (j == 0 && (!switch_true(mirror) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND)) {
...
...
@@ -5812,6 +5813,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
video_up
:
if
(
session
&&
v_engine
)
{
printf
(
"WTFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF?????
\n
"
);
check_dtls_reinvite
(
session
,
v_engine
);
}
...
...
src/switch_rtp.c
浏览文件 @
90d3cb63
...
...
@@ -379,6 +379,7 @@ struct switch_rtp {
switch_mutex_t
*
flag_mutex
;
switch_mutex_t
*
read_mutex
;
switch_mutex_t
*
write_mutex
;
switch_mutex_t
*
ice_mutex
;
switch_timer_t
timer
;
uint8_t
ready
;
uint8_t
cn
;
...
...
@@ -842,6 +843,8 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
return
;
}
switch_mutex_lock
(
rtp_session
->
ice_mutex
);
READ_INC
(
rtp_session
);
WRITE_INC
(
rtp_session
);
...
...
@@ -1213,7 +1216,7 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
end:
switch_mutex_unlock
(
rtp_session
->
ice_mutex
);
READ_DEC
(
rtp_session
);
WRITE_DEC
(
rtp_session
);
}
...
...
@@ -3499,6 +3502,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
switch_mutex_init
(
&
rtp_session
->
flag_mutex
,
SWITCH_MUTEX_NESTED
,
pool
);
switch_mutex_init
(
&
rtp_session
->
read_mutex
,
SWITCH_MUTEX_NESTED
,
pool
);
switch_mutex_init
(
&
rtp_session
->
write_mutex
,
SWITCH_MUTEX_NESTED
,
pool
);
switch_mutex_init
(
&
rtp_session
->
ice_mutex
,
SWITCH_MUTEX_NESTED
,
pool
);
switch_mutex_init
(
&
rtp_session
->
dtmf_data
.
dtmf_mutex
,
SWITCH_MUTEX_NESTED
,
pool
);
switch_queue_create
(
&
rtp_session
->
dtmf_data
.
dtmf_queue
,
100
,
rtp_session
->
pool
);
switch_queue_create
(
&
rtp_session
->
dtmf_data
.
dtmf_inqueue
,
100
,
rtp_session
->
pool
);
...
...
@@ -3947,7 +3951,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_activate_ice(switch_rtp_t *rtp_sessio
switch_port_t
port
=
0
;
char
bufc
[
30
];
READ_INC
(
rtp_session
);
switch_mutex_lock
(
rtp_session
->
ice_mutex
);
if
(
proto
==
IPR_RTP
)
{
ice
=
&
rtp_session
->
ice
;
...
...
@@ -4016,7 +4020,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_activate_ice(switch_rtp_t *rtp_sessio
switch_rtp_break
(
rtp_session
);
}
READ_DEC
(
rtp_session
);
switch_mutex_unlock
(
rtp_session
->
ice_mutex
);
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -6630,11 +6634,13 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
srtp_dealloc
(
rtp_session
->
send_ctx
[
rtp_session
->
srtp_idx_rtp
]);
rtp_session
->
send_ctx
[
rtp_session
->
srtp_idx_rtp
]
=
NULL
;
if
((
stat
=
srtp_create
(
&
rtp_session
->
send_ctx
[
rtp_session
->
srtp_idx_rtp
],
&
rtp_session
->
send_policy
[
rtp_session
->
srtp_idx_rtp
])))
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_ERROR
,
"Error! RE-Activating Secure RTP SEND
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_ERROR
,
"Error! RE-Activating %s Secure RTP SEND
\n
"
,
rtp_type
(
rtp_session
));
ret
=
-
1
;
goto
end
;
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_INFO
,
"RE-Activating Secure RTP SEND
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_INFO
,
"RE-Activating %s Secure RTP SEND
\n
"
,
rtp_type
(
rtp_session
));
}
}
...
...
@@ -6642,7 +6648,8 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
stat
=
srtp_protect
(
rtp_session
->
send_ctx
[
rtp_session
->
srtp_idx_rtp
],
&
send_msg
->
header
,
&
sbytes
);
if
(
stat
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_ERROR
,
"Error: SRTP protection failed with code %d
\n
"
,
stat
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
rtp_session
->
session
),
SWITCH_LOG_ERROR
,
"Error: %s SRTP protection failed with code %d
\n
"
,
rtp_type
(
rtp_session
),
stat
);
}
bytes
=
sbytes
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论