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

for #324, refine code, add hstrs config.

This commit is contained in:
winlin 2015-03-14 09:52:47 +08:00
parent 2adc069df0
commit 6d15d0ea99
15 changed files with 97 additions and 50 deletions

View file

@ -1471,7 +1471,7 @@ int SrsConfig::check_config()
} else if (n == "http_remux") {
for (int j = 0; j < (int)conf->directives.size(); j++) {
string m = conf->at(j)->name.c_str();
if (m != "enabled" && m != "mount" && m != "fast_cache") {
if (m != "enabled" && m != "mount" && m != "fast_cache" && m != "crss") {
ret = ERROR_SYSTEM_CONFIG_INVALID;
srs_error("unsupported vhost http_remux directive %s, ret=%d", m.c_str(), ret);
return ret;
@ -3751,6 +3751,30 @@ string SrsConfig::get_vhost_http_remux_mount(string vhost)
return conf->arg0();
}
bool SrsConfig::get_vhost_http_remux_hstrs(string vhost)
{
SrsConfDirective* conf = get_vhost(vhost);
if (!conf) {
return false;
}
conf = conf->get("http_remux");
if (!conf) {
return false;
}
conf = conf->get("hstrs");
if (!conf) {
return false;
}
if (conf->arg0() == "on") {
return true;
}
return false;
}
SrsConfDirective* SrsConfig::get_heartbeart()
{
return root->get("heartbeat");