mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine code, move default to config function.
This commit is contained in:
parent
39a2d51c66
commit
bc033d5de3
1 changed files with 6 additions and 6 deletions
|
@ -133,7 +133,6 @@ using namespace _srs_internal;
|
|||
#define SRS_CONF_DEFAULT_TRANSCODE_IFORMAT "flv"
|
||||
#define SRS_CONF_DEFAULT_TRANSCODE_OFORMAT "flv"
|
||||
|
||||
#define SRS_CONF_DEFAULT_EDGE_MODE false
|
||||
#define SRS_CONF_DEFAULT_EDGE_TOKEN_TRAVERSE false
|
||||
#define SRS_CONF_DEFAULT_EDGE_TRANSFORM_VHOST "[vhost]"
|
||||
|
||||
|
@ -2743,17 +2742,18 @@ bool SrsConfig::get_vhost_is_edge(string vhost)
|
|||
|
||||
bool SrsConfig::get_vhost_is_edge(SrsConfDirective* vhost)
|
||||
{
|
||||
static bool DEFAULT = false;
|
||||
SrsConfDirective* conf = vhost;
|
||||
|
||||
|
||||
if (!conf) {
|
||||
return SRS_CONF_DEFAULT_EDGE_MODE;
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
conf = conf->get("mode");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
return SRS_CONF_DEFAULT_EDGE_MODE;
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
return "remote" == conf->arg0();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue