1.12.2: Bugfix and log message improvements

This commit is contained in:
Dmitri Tikhonov 2018-08-20 11:07:29 -04:00
parent dada56db5e
commit 483646ebc3
4 changed files with 14 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2018-08-20
- 1.12.2
- [BUGFIX] Update count of scheduled bytes when adjusting size of
an already-scheduled packet.
- Emit info instead of warning messages when stream is used in
unexpected ways.
2018-08-17 2018-08-17
- 1.12.0 - 1.12.0

View file

@ -25,7 +25,7 @@ extern "C" {
#define LSQUIC_MAJOR_VERSION 1 #define LSQUIC_MAJOR_VERSION 1
#define LSQUIC_MINOR_VERSION 12 #define LSQUIC_MINOR_VERSION 12
#define LSQUIC_PATCH_VERSION 0 #define LSQUIC_PATCH_VERSION 2
/** /**
* Engine flags: * Engine flags:

View file

@ -1270,7 +1270,8 @@ update_for_resending (lsquic_send_ctl_t *ctl, lsquic_packet_out_t *packet_out)
assert(packet_out->po_regen_sz < packet_out->po_data_sz); assert(packet_out->po_regen_sz < packet_out->po_data_sz);
if (packet_out->po_regen_sz) if (packet_out->po_regen_sz)
{ {
assert(!(packet_out->po_flags & PO_SCHED)); if (packet_out->po_flags & PO_SCHED)
ctl->sc_bytes_scheduled -= packet_out->po_regen_sz;
lsquic_packet_out_chop_regen(packet_out); lsquic_packet_out_chop_regen(packet_out);
} }
LSQ_DEBUG("Packet %"PRIu64" repackaged for resending as packet %"PRIu64, LSQ_DEBUG("Packet %"PRIu64" repackaged for resending as packet %"PRIu64,

View file

@ -1386,7 +1386,7 @@ lsquic_stream_flush_threshold (const struct lsquic_stream *stream)
if ((stream->stream_flags & (STREAM_USE_HEADERS|STREAM_HEADERS_SENT)) \ if ((stream->stream_flags & (STREAM_USE_HEADERS|STREAM_HEADERS_SENT)) \
== STREAM_USE_HEADERS) \ == STREAM_USE_HEADERS) \
{ \ { \
LSQ_WARN("Attempt to write to stream before sending HTTP headers"); \ LSQ_INFO("Attempt to write to stream before sending HTTP headers"); \
errno = EILSEQ; \ errno = EILSEQ; \
return -1; \ return -1; \
} \ } \
@ -1398,7 +1398,7 @@ lsquic_stream_flush_threshold (const struct lsquic_stream *stream)
} \ } \
if (stream->stream_flags & (STREAM_U_WRITE_DONE|STREAM_FIN_SENT)) \ if (stream->stream_flags & (STREAM_U_WRITE_DONE|STREAM_FIN_SENT)) \
{ \ { \
LSQ_WARN("Attempt to write to stream after it was closed for " \ LSQ_INFO("Attempt to write to stream after it was closed for " \
"writing"); \ "writing"); \
errno = EBADF; \ errno = EBADF; \
return -1; \ return -1; \
@ -1847,7 +1847,7 @@ lsquic_stream_send_headers (lsquic_stream_t *stream,
} }
else else
{ {
LSQ_WARN("cannot send headers for stream %u in this state", stream->id); LSQ_INFO("cannot send headers for stream %u in this state", stream->id);
errno = EBADMSG; errno = EBADMSG;
return -1; return -1;
} }