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-06-23 11:18:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
db253bc76b89878c28f65157537cc5ea73df5e19
db253bc7
1 parent
6c70e919
fix fms token traverse bug, always update the token by the latest valid client.
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
32 行增加
和
2 行删除
trunk/src/app/srs_app_source.cpp
trunk/src/core/srs_core.hpp
trunk/src/rtmp/srs_protocol_rtmp.cpp
trunk/src/rtmp/srs_protocol_rtmp.hpp
trunk/src/app/srs_app_source.cpp
查看文件 @
db253bc
...
...
@@ -439,7 +439,14 @@ int SrsSource::find(SrsRequest* req, SrsSource** ppsource)
srs_info
(
"create new source for url=%s, vhost=%s"
,
stream_url
.
c_str
(),
vhost
.
c_str
());
}
*
ppsource
=
pool
[
stream_url
];
// we always update the request of resource,
// for origin auth is on, the token in request maybe invalid,
// and we only need to update the token of request, it's simple.
if
(
true
)
{
SrsSource
*
source
=
pool
[
stream_url
];
source
->
_req
->
update_auth
(
req
);
*
ppsource
=
source
;
}
return
ret
;
}
...
...
trunk/src/core/srs_core.hpp
查看文件 @
db253bc
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "13
0
"
#define VERSION_REVISION "13
1
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
trunk/src/rtmp/srs_protocol_rtmp.cpp
查看文件 @
db253bc
...
...
@@ -108,6 +108,22 @@ SrsRequest* SrsRequest::copy()
return
cp
;
}
void
SrsRequest
::
update_auth
(
SrsRequest
*
req
)
{
pageUrl
=
req
->
pageUrl
;
swfUrl
=
req
->
swfUrl
;
tcUrl
=
req
->
tcUrl
;
if
(
args
)
{
srs_freep
(
args
);
}
if
(
req
->
args
)
{
args
=
req
->
args
->
copy
()
->
to_object
();
}
srs_info
(
"update req of soruce for auth ok"
);
}
int
SrsRequest
::
discovery_app
()
{
int
ret
=
ERROR_SUCCESS
;
...
...
trunk/src/rtmp/srs_protocol_rtmp.hpp
查看文件 @
db253bc
...
...
@@ -89,6 +89,13 @@ public:
* when reload it, the request maybe invalid, so need to copy it.
*/
virtual
SrsRequest
*
copy
();
/**
* update the auth info of request,
* to keep the current request ptr is ok,
* for many components use the ptr of request.
*/
virtual
void
update_auth
(
SrsRequest
*
req
);
/**
* disconvery vhost/app from tcUrl.
...
...
请
注册
或
登录
后发表评论