Skip to content

Commit ce01a62

Browse files
authored
Merge pull request #1834 from private-octopus/tighten-prepare-to-send
Add reset test and one error log
2 parents cd0223f + ee59edb commit ce01a62

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ else()
88
endif()
99

1010
project(picoquic
11-
VERSION 1.1.30.1
11+
VERSION 1.1.30.2
1212
DESCRIPTION "picoquic library"
1313
LANGUAGES C CXX)
1414

picoquic/frames.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,11 @@ uint8_t * picoquic_format_stream_frame(picoquic_cnx_t* cnx, picoquic_stream_head
16401640
}
16411641
}
16421642

1643-
if (stream->reset_requested && !stream->reset_sent) {
1643+
if (stream->reset_sent) {
1644+
/* No data will be sent after a reset */
1645+
return bytes;
1646+
}
1647+
else if (stream->reset_requested && !stream->reset_sent) {
16441648
return picoquic_format_stream_reset_frame(cnx, stream, bytes, bytes_max, more_data, is_pure_ack);
16451649
}
16461650

@@ -1716,9 +1720,9 @@ uint8_t * picoquic_format_stream_frame(picoquic_cnx_t* cnx, picoquic_stream_head
17161720
stream_data_context.app_buffer < bytes0 ||
17171721
stream_data_context.app_buffer >= bytes_max) {
17181722
long long delta_buf = (long long)(stream_data_context.app_buffer - bytes);
1719-
DBG_PRINTF("Stream data buffer corruption, delta = %lld\n", delta_buf);
1720-
*ret = PICOQUIC_ERROR_UNEXPECTED_ERROR;
1721-
/* CHECK: SHOULD bytes BE NULL ? */
1723+
picoquic_log_app_message(cnx, "Stream data buffer corruption, delta = %lld\n", delta_buf);
1724+
*ret = picoquic_connection_error_ex(cnx, PICOQUIC_TRANSPORT_INTERNAL_ERROR, 0,
1725+
"Stream data buffer corruption");
17221726
}
17231727
}
17241728

picoquic/picoquic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
extern "C" {
4141
#endif
4242

43-
#define PICOQUIC_VERSION "1.1.30.1"
43+
#define PICOQUIC_VERSION "1.1.30.2"
4444
#define PICOQUIC_ERROR_CLASS 0x400
4545
#define PICOQUIC_ERROR_DUPLICATE (PICOQUIC_ERROR_CLASS + 1)
4646
#define PICOQUIC_ERROR_AEAD_CHECK (PICOQUIC_ERROR_CLASS + 3)

0 commit comments

Comments
 (0)