Skip to content

Commit f2326ef

Browse files
authored
fix(cliprdr)!: receiving a TemporaryDirectory PDU should not fail the svc (#1031)
- Fixes the Cliprdr `SvcProcessor` impl. to support handling a `TemporaryDirectory` Clipboard PDU. - Removes `ClipboardError::UnimplementedPdu` since it is no longer used
1 parent 966ba8a commit f2326ef

File tree

1 file changed

+4
-7
lines changed
  • crates/ironrdp-cliprdr/src

1 file changed

+4
-7
lines changed

crates/ironrdp-cliprdr/src/lib.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@ pub type CliprdrSvcMessages<R> = SvcProcessorMessages<Cliprdr<R>>;
2828

2929
#[derive(Debug)]
3030
enum ClipboardError {
31-
UnimplementedPdu { pdu: &'static str },
3231
FormatListRejected,
3332
}
3433

3534
impl core::fmt::Display for ClipboardError {
3635
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3736
match self {
38-
ClipboardError::UnimplementedPdu { pdu } => {
39-
write!(f, "received clipboard PDU `{pdu}` is not implemented")
40-
}
4137
ClipboardError::FormatListRejected => write!(f, "sent format list was rejected"),
4238
}
4339
}
@@ -333,9 +329,10 @@ impl<R: Role> SvcProcessor for Cliprdr<R> {
333329
self.backend.on_file_contents_response(response);
334330
Ok(Vec::new())
335331
}
336-
_ => self.handle_error_transition(ClipboardError::UnimplementedPdu {
337-
pdu: pdu.message_name(),
338-
}),
332+
ClipboardPdu::TemporaryDirectory(_) => {
333+
// do nothing
334+
Ok(Vec::new())
335+
}
339336
}
340337
}
341338

0 commit comments

Comments
 (0)