Skip to content

Commit f21470c

Browse files
authored
fix(dvc)!: add channel_id parameter to DvcChannelListener::create (#1358)
Updates the dynamic virtual channel (DVC) client listener interface in ironrdp-dvc to pass the channel_id (from the incoming DYNVC_CREATE_REQ) into the listener’s create method, enabling listeners to differentiate/control per-instance behavior based on the negotiated dynamic channel ID.
1 parent ef20ea4 commit f21470c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

crates/ironrdp-dvc/src/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub trait DvcChannelListener: Send {
2525

2626
/// Called for each incoming DYNVC_CREATE_REQ matching this name.
2727
/// Return `None` to reject (NO_LISTENER).
28-
fn create(&mut self) -> Option<Box<dyn DvcProcessor>>;
28+
fn create(&mut self, channel_id: DynamicChannelId) -> Option<Box<dyn DvcProcessor>>;
2929
}
3030

3131
pub type DynamicChannelListener = Box<dyn DvcChannelListener>;
@@ -51,7 +51,7 @@ impl DvcChannelListener for OnceListener {
5151
.channel_name()
5252
}
5353

54-
fn create(&mut self) -> Option<Box<dyn DvcProcessor>> {
54+
fn create(&mut self, _channel_id: DynamicChannelId) -> Option<Box<dyn DvcProcessor>> {
5555
self.inner.take()
5656
}
5757
}
@@ -320,7 +320,7 @@ impl DynamicChannelSet {
320320
channel_id: DynamicChannelId,
321321
) -> Option<&mut DynamicVirtualChannel> {
322322
let entry = self.listeners.get_mut(name)?;
323-
let processor = entry.listener.create()?;
323+
let processor = entry.listener.create(channel_id)?;
324324

325325
if let Some(type_id) = entry.type_id {
326326
self.type_id_to_channel_id.insert(type_id, channel_id);

0 commit comments

Comments
 (0)