mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine config, allow parse multiple times.
This commit is contained in:
parent
6239dfa489
commit
74c1944e15
4 changed files with 17 additions and 2 deletions
|
@ -3959,7 +3959,12 @@ srs_error_t SrsConfig::check_number_connections()
|
|||
srs_error_t SrsConfig::parse_buffer(SrsConfigBuffer* buffer)
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
|
||||
// We use a new root to parse buffer, to allow parse multiple times.
|
||||
srs_freep(root);
|
||||
root = new SrsConfDirective();
|
||||
|
||||
// Parse root tree from buffer.
|
||||
if ((err = root->parse(buffer)) != srs_success) {
|
||||
return srs_error_wrap(err, "root parse");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue