Skip to content

Commit 504d3f4

Browse files
committed
review: drop the unused Default derive and correct the FramedRead comment
Nothing builds a default TunnelMessage, and a default one would be an empty Tunnel Data PDU. The FramedRead comment said the tunnel consumes the sub-headers before this point; recv drops them, and a caller that needs them uses recv_message.
1 parent 7255643 commit 504d3f4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎crates/ironrdp-rdpeudp-tokio/src/framed.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ impl FramedRead for UdpTransport {
3232
// puts no minimum on HigherLayerData, and [MS-RDPBCGR] 1.3.9 sends
3333
// the four Continuous Auto-Detection messages "encapsulated in the
3434
// RDP_TUNNEL_SUBHEADER structure ... over the sideband channels
35-
// that are in active use". The tunnel has already taken what it
36-
// needs from those subheaders by the time we get here, leaving a
37-
// payload of nothing to pass on.
35+
// that are in active use". `recv` drops those subheaders (a caller
36+
// that needs them uses `recv_message`), leaving a payload of
37+
// nothing to pass on.
3838
loop {
3939
match self.recv().await {
4040
Some(data) if data.is_empty() => continue,

‎crates/ironrdp-rdpeudp-tokio/src/transport.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl<T> Drop for AbortOnDrop<T> {
220220
/// [MS-RDPBCGR] 1.3.9 sends over a sideband channel in use, such as a
221221
/// bandwidth measurement's Start and Stop and the client's results. `data`
222222
/// may be empty when a message carries only sub-headers.
223-
#[derive(Debug, Clone, Default, PartialEq, Eq)]
223+
#[derive(Debug, Clone, PartialEq, Eq)]
224224
pub struct TunnelMessage {
225225
pub sub_headers: Vec<ironrdp_rdpemt::TunnelSubHeader>,
226226
pub data: Vec<u8>,

0 commit comments

Comments
 (0)