mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
finish basic utest for config
This commit is contained in:
parent
9b6c22644d
commit
86ad39f001
4 changed files with 280 additions and 4 deletions
|
@ -170,21 +170,22 @@ int SrsConfDirective::parse_conf(_srs_internal::SrsConfigBuffer* buffer, SrsDire
|
|||
}
|
||||
if (ret == ERROR_SYSTEM_CONFIG_BLOCK_END) {
|
||||
if (type != parse_block) {
|
||||
srs_error("line %d: unexpected \"}\"", buffer->line + 1);
|
||||
srs_error("line %d: unexpected \"}\", ret=%d", buffer->line + 1, ret);
|
||||
return ret;
|
||||
}
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
if (ret == ERROR_SYSTEM_CONFIG_EOF) {
|
||||
if (type == parse_block) {
|
||||
srs_error("line %d: unexpected end of file, expecting \"}\"", conf_line + 1);
|
||||
srs_error("line %d: unexpected end of file, expecting \"}\", ret=%d", conf_line + 1, ret);
|
||||
return ret;
|
||||
}
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
if (args.empty()) {
|
||||
srs_error("line %d: empty directive.", conf_line + 1);
|
||||
ret = ERROR_SYSTEM_CONFIG_INVALID;
|
||||
srs_error("line %d: empty directive. ret=%d", conf_line + 1, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue