Config: Add more utest for env config. v6.0.147 v7.0.4#4142
Merged
winlinvip merged 4 commits intoossrs:developfrom Aug 15, 2024
Merged
Config: Add more utest for env config. v6.0.147 v7.0.4#4142winlinvip merged 4 commits intoossrs:developfrom
winlinvip merged 4 commits intoossrs:developfrom
Conversation
79bdf7a to
572fb7d
Compare
1. don't use static variable to store the result; 2. add more UT to handle the multi value and values with whitespaces;
572fb7d to
26f6368
Compare
winlinvip
reviewed
Aug 13, 2024
winlinvip
approved these changes
Aug 14, 2024
c774bf9 to
953a62b
Compare
winlinvip
approved these changes
Aug 15, 2024
winlinvip
added a commit
that referenced
this pull request
Aug 15, 2024
1. don't use static variable to store the result; 2. add more UT to handle the multi value and values with whitespaces; related to #4092 https://github.com/ossrs/srs/blob/16e569d82357757ddac6ef91d7a5fe7837319909/trunk/src/app/srs_app_config.cpp#L71-L82 `static SrsConfDirective* dir` removed, this static var here is to avoid the memory leak, I add the `SrsConfDirective` instance to the `env_dirs` directive container, which will destroy itself inside `SrsConfig` destructor. --------- Co-authored-by: winlin <winlinvip@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related to #4092
srs/trunk/src/app/srs_app_config.cpp
Lines 71 to 82 in 16e569d
static SrsConfDirective* dirremoved, this static var here is to avoid the memory leak, I add theSrsConfDirectiveinstance to theenv_dirsdirective container, which will destroy itself insideSrsConfigdestructor.