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

refine config, return the vhosts vector.

This commit is contained in:
winlin 2014-07-18 10:35:31 +08:00
parent 96e0e699dd
commit f572531eca
3 changed files with 33 additions and 13 deletions

View file

@ -1412,10 +1412,12 @@ SrsConfDirective* SrsConfig::get_vhost(string vhost)
return NULL;
}
void SrsConfig::get_vhosts(std::vector<SrsConfDirective*>& vhosts)
vector<SrsConfDirective*> SrsConfig::get_vhosts()
{
srs_assert(root);
std::vector<SrsConfDirective*> vhosts;
for (int i = 0; i < (int)root->directives.size(); i++) {
SrsConfDirective* conf = root->at(i);
@ -1425,6 +1427,8 @@ void SrsConfig::get_vhosts(std::vector<SrsConfDirective*>& vhosts)
vhosts.push_back(conf);
}
return vhosts;
}
SrsConfDirective* SrsConfig::get_vhost_on_connect(string vhost)