mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1186, refactor security check. 3.0.114
This commit is contained in:
parent
c01806d5c4
commit
c51c378869
7 changed files with 178 additions and 53 deletions
|
@ -735,13 +735,28 @@ SrsConfDirective* SrsConfDirective::get_or_create(string n, string a0)
|
|||
if (!conf) {
|
||||
conf = new SrsConfDirective();
|
||||
conf->name = n;
|
||||
conf->set_arg0(a0);
|
||||
conf->args.push_back(a0);
|
||||
directives.push_back(conf);
|
||||
}
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
SrsConfDirective* SrsConfDirective::get_or_create(string n, string a0, string a1)
|
||||
{
|
||||
SrsConfDirective* conf = get(n, a0);
|
||||
|
||||
if (!conf) {
|
||||
conf = new SrsConfDirective();
|
||||
conf->name = n;
|
||||
conf->args.push_back(a0);
|
||||
conf->args.push_back(a1);
|
||||
directives.push_back(conf);
|
||||
}
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
SrsConfDirective* SrsConfDirective::set_arg0(string a0)
|
||||
{
|
||||
if (arg0() == a0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue