mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
specifies the try default vhost
This commit is contained in:
parent
d267b8fa19
commit
11e11005ac
2 changed files with 5 additions and 5 deletions
|
@ -418,8 +418,8 @@ int SrsRtmpConn::do_cycle()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check vhost
|
// check vhost, allow default vhost.
|
||||||
if ((ret = check_vhost()) != ERROR_SUCCESS) {
|
if ((ret = check_vhost(true)) != ERROR_SUCCESS) {
|
||||||
srs_error("check vhost failed. ret=%d", ret);
|
srs_error("check vhost failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -787,13 +787,13 @@ int SrsRtmpConn::stream_service_cycle()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SrsRtmpConn::check_vhost()
|
int SrsRtmpConn::check_vhost(bool try_default_vhost)
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
srs_assert(req != NULL);
|
srs_assert(req != NULL);
|
||||||
|
|
||||||
SrsConfDirective* vhost = _srs_config->get_vhost(req->vhost);
|
SrsConfDirective* vhost = _srs_config->get_vhost(req->vhost, try_default_vhost);
|
||||||
if (vhost == NULL) {
|
if (vhost == NULL) {
|
||||||
ret = ERROR_RTMP_VHOST_NOT_FOUND;
|
ret = ERROR_RTMP_VHOST_NOT_FOUND;
|
||||||
srs_error("vhost %s not found. ret=%d", req->vhost.c_str(), ret);
|
srs_error("vhost %s not found. ret=%d", req->vhost.c_str(), ret);
|
||||||
|
|
|
@ -171,7 +171,7 @@ private:
|
||||||
virtual int service_cycle();
|
virtual int service_cycle();
|
||||||
// stream(play/publish) service cycle, identify client first.
|
// stream(play/publish) service cycle, identify client first.
|
||||||
virtual int stream_service_cycle();
|
virtual int stream_service_cycle();
|
||||||
virtual int check_vhost();
|
virtual int check_vhost(bool try_default_vhost);
|
||||||
virtual int playing(SrsSource* source);
|
virtual int playing(SrsSource* source);
|
||||||
virtual int do_playing(SrsSource* source, SrsConsumer* consumer, SrsQueueRecvThread* trd);
|
virtual int do_playing(SrsSource* source, SrsConsumer* consumer, SrsQueueRecvThread* trd);
|
||||||
virtual int publishing(SrsSource* source);
|
virtual int publishing(SrsSource* source);
|
||||||
|
|
Loading…
Reference in a new issue