Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-12-02 15:24:00 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
ba3e7c28da19490c0bd47ff6717b44a62b13fe3c
ba3e7c28
2 parents
0c132e97
3d0d43c5
Merge pull request #239 from tufang14/1.0release
token traverse bug, tranverse token then response the connect request.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
10 行增加
和
8 行删除
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
ba3e7c2
...
...
@@ -244,6 +244,16 @@ int SrsRtmpConn::service_cycle()
return
bandwidth
->
bandwidth_check
(
rtmp
,
skt
,
req
,
local_ip
);
}
// do token traverse before serve it.
bool
vhost_is_edge
=
_srs_config
->
get_vhost_is_edge
(
req
->
vhost
);
bool
edge_traverse
=
_srs_config
->
get_vhost_edge_token_traverse
(
req
->
vhost
);
if
(
vhost_is_edge
&&
edge_traverse
)
{
if
((
ret
=
check_edge_token_traverse_auth
())
!=
ERROR_SUCCESS
)
{
srs_warn
(
"token auth failed, ret=%d"
,
ret
);
return
ret
;
}
}
if
((
ret
=
rtmp
->
response_connect_app
(
req
,
local_ip
.
c_str
()))
!=
ERROR_SUCCESS
)
{
srs_error
(
"response connect app failed. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -326,15 +336,7 @@ int SrsRtmpConn::stream_service_cycle()
}
srs_info
(
"set chunk_size=%d success"
,
chunk_size
);
// do token traverse before serve it.
bool
vhost_is_edge
=
_srs_config
->
get_vhost_is_edge
(
req
->
vhost
);
bool
edge_traverse
=
_srs_config
->
get_vhost_edge_token_traverse
(
req
->
vhost
);
if
(
vhost_is_edge
&&
edge_traverse
)
{
if
((
ret
=
check_edge_token_traverse_auth
())
!=
ERROR_SUCCESS
)
{
srs_warn
(
"token auth failed, ret=%d"
,
ret
);
return
ret
;
}
}
// find a source to serve.
SrsSource
*
source
=
NULL
;
...
...
请
注册
或
登录
后发表评论