1
0
Fork 0
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:
winlin 2014-07-20 15:53:19 +08:00
parent 9b6c22644d
commit 86ad39f001
4 changed files with 280 additions and 4 deletions

View file

@ -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;
}