diff options
author | 2021-10-27 21:12:02 +0100 | |
---|---|---|
committer | 2021-11-12 13:36:30 +0000 | |
commit | a529d22363e946417381da46f6464de840b4e1c7 (patch) | |
tree | 53bc36bd8c828b43a06ffaf4efaa22fc2a233ef5 | |
parent | 69135e29987803bbe4089c0be18030f30c7f89e3 (diff) | |
download | quiche-a529d22363e946417381da46f6464de840b4e1c7.tar.gz quiche-a529d22363e946417381da46f6464de840b4e1c7.tar.zst quiche-a529d22363e946417381da46f6464de840b4e1c7.zip |
qlog: stream fin is optional, only record if true
-rw-r--r-- | src/frame.rs | 4 | ||||
-rw-r--r-- | tools/qlog/src/events/quic.rs | 2 | ||||
-rw-r--r-- | tools/qlog/src/lib.rs | 4 | ||||
-rw-r--r-- | tools/qlog/src/streamer.rs | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/frame.rs b/src/frame.rs index b8037551..8c6fd80a 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -856,7 +856,7 @@ impl Frame { stream_id: *stream_id, offset: data.off() as u64, length: data.len() as u64, - fin: data.fin(), + fin: data.fin().then(|| true), raw: None, }, @@ -869,7 +869,7 @@ impl Frame { stream_id: *stream_id, offset: *offset, length: *length as u64, - fin: *fin, + fin: fin.then(|| true), raw: None, }, diff --git a/tools/qlog/src/events/quic.rs b/tools/qlog/src/events/quic.rs index 28acad75..78893795 100644 --- a/tools/qlog/src/events/quic.rs +++ b/tools/qlog/src/events/quic.rs @@ -385,7 +385,7 @@ pub enum QuicFrame { stream_id: u64, offset: u64, length: u64, - fin: bool, + fin: Option<bool>, raw: Option<Bytes>, }, diff --git a/tools/qlog/src/lib.rs b/tools/qlog/src/lib.rs index 20b56cfa..cedc9d35 100644 --- a/tools/qlog/src/lib.rs +++ b/tools/qlog/src/lib.rs @@ -841,7 +841,7 @@ mod tests { stream_id: 0, offset: 0, length: 100, - fin: true, + fin: Some(true), raw: None, }); @@ -938,7 +938,7 @@ mod tests { stream_id: 0, offset: 0, length: 100, - fin: true, + fin: Some(true), raw: None, }]; let event_data = EventData::PacketSent(PacketSent { diff --git a/tools/qlog/src/streamer.rs b/tools/qlog/src/streamer.rs index 909f3ae4..09fcc1e9 100644 --- a/tools/qlog/src/streamer.rs +++ b/tools/qlog/src/streamer.rs @@ -356,7 +356,7 @@ mod tests { stream_id: 40, offset: 40, length: 400, - fin: true, + fin: Some(true), raw: None, }; @@ -379,7 +379,7 @@ mod tests { stream_id: 0, offset: 0, length: 100, - fin: true, + fin: Some(true), raw: None, }; @@ -387,7 +387,7 @@ mod tests { stream_id: 0, offset: 0, length: 100, - fin: true, + fin: Some(true), raw: None, }; |