mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refactor code for #1691
This commit is contained in:
parent
49f88a3326
commit
cf48a5594d
5 changed files with 4 additions and 49 deletions
|
@ -120,7 +120,6 @@ srs_error_t SrsHttpParser::parse_message_imp(ISrsReader* reader)
|
|||
if (buffer->size() > 0) {
|
||||
ssize_t consumed = http_parser_execute(&parser, &settings, buffer->bytes(), buffer->size());
|
||||
|
||||
|
||||
// The error is set in http_errno.
|
||||
enum http_errno code;
|
||||
if ((code = HTTP_PARSER_ERRNO(&parser)) != HPE_OK) {
|
||||
|
@ -141,8 +140,7 @@ srs_error_t SrsHttpParser::parse_message_imp(ISrsReader* reader)
|
|||
}
|
||||
}
|
||||
|
||||
//TODO: fixme 'nparsed' undefined, open info compile error!
|
||||
srs_info("size=%d, nparsed=%d, consumed=%d", buffer->size(), (int)nparsed, consumed);
|
||||
srs_info("size=%d, nparsed=%d", buffer->size(), (int)consumed);
|
||||
|
||||
// Only consume the header bytes.
|
||||
buffer->read_slice(consumed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue