Skip to content

Commit

Permalink
Fix code warning in decode stream frame
Browse files Browse the repository at this point in the history
  • Loading branch information
huitema committed Aug 21, 2024
1 parent e78af22 commit 989fe71
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions picoquic/frames.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,13 +1295,22 @@ const uint8_t* picoquic_decode_stream_frame(picoquic_cnx_t* cnx, const uint8_t*
}else if (offset + data_length >= (1ull<<62)){
picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_FINAL_OFFSET_ERROR, 0);
bytes = NULL;
} else if (picoquic_stream_network_input(cnx, stream_id, offset,
fin, (bytes += consumed), data_length, received_data,
picoquic_is_last_stream_frame(bytes+data_length, bytes_max),
current_time) != 0) {
bytes = NULL;
} else {
bytes += data_length;
}
else {
/* Skip the header bytes, and try to deliver the content of the frame.
* The "is last" indication is set when we are certain that no other data
* follows. It is used to manage the queue of stream chunks awaiting delivery.
*/
bytes += consumed;
if (picoquic_stream_network_input(cnx, stream_id, offset,
fin, bytes, data_length, received_data,
picoquic_is_last_stream_frame(bytes + data_length, bytes_max),
current_time) != 0) {
bytes = NULL;
}
else {
bytes += data_length;
}
}

return bytes;
Expand Down

0 comments on commit 989fe71

Please sign in to comment.