This commit is contained in:
Eugene Pankov 2022-09-06 00:07:38 +02:00
parent 43ba2dde1c
commit a1dc78e5cf
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4
2 changed files with 8 additions and 7 deletions

View file

@ -329,7 +329,10 @@ impl RemoteClient {
Ok(false)
}
async fn setup_server_initiated_channel(&mut self, channel: russh::Channel<russh::client::Msg>) -> Uuid {
async fn setup_server_initiated_channel(
&mut self,
channel: russh::Channel<russh::client::Msg>,
) -> Uuid {
let id = Uuid::new_v4();
let (tx, rx) = unbounded_channel();

View file

@ -356,7 +356,8 @@ impl ServerSession {
Event::ConsoleInput(_) => (),
}
Ok(())
}.boxed()
}
.boxed()
}
async fn handle_server_handler_event(&mut self, event: ServerHandlerEvent) -> Result<()> {
@ -740,13 +741,10 @@ impl ServerSession {
self.all_channels.push(id);
}
}
RCEvent::X11(id, originator_address, originator_port) =>{
RCEvent::X11(id, originator_address, originator_port) => {
if let Some(session) = &mut self.session_handle {
let server_channel = session
.channel_open_x11(
originator_address,
originator_port,
)
.channel_open_x11(originator_address, originator_port)
.await?;
self.channel_map