1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix fms token traverse bug, always update the token by the latest valid client.

This commit is contained in:
winlin 2014-06-23 11:18:55 +08:00
parent 6c70e9192b
commit db253bc76b
4 changed files with 32 additions and 2 deletions

View file

@ -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;

View file

@ -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.