pijul nest
guest [sign in]

Adding method `send_channel_msg` to client::Session, to make it easier to write handlers

[?]
Jan 13, 2021, 9:41 AM
BRDS7STAKAIUHJ2ORB3HLPMQCXILWWOC5DPXKL6P2AT7CUSZD4OQC

Dependencies

  • [2] ASD7JVBE Do not read past the size of the buffer (after Tokio 0.3)
  • [3] Y67GNDVB use tokio::process::Command for proxy commands
  • [4] KNLLUDOI Correct usage of `tokio::select!`
  • [5] VYDCQWSF Version 0.30.6
  • [6] 634OYCNM Tokio 0.3
  • [7] 2WEO7OZL Version updates: getting rid of anyhow + moving to Tokio 1.0
  • [8] CQSPFH4H Version 0.30.4
  • [9] TFYJ3P2A Version 0.30.8/0.19.4, and solving conflicts
  • [10] ELRPPXSG Fixing conflicts
  • [11] 7FRJYUI6 Reboot because of a bad change
  • [12] DJT33BQE Version bump
  • [13] E2SB74SV Version 0.30.3
  • [14] PDTFLA4Y Version 0.30.7

Change contents

  • edit in thrussh/src/client/proxy.rs at line 5
    [4.332856]
    [4.332883]
    use std::process::Command;
  • edit in thrussh/src/client/proxy.rs at line 9
    [4.332961][3.603:632]()
    use tokio::process::Command;
  • replacement in thrussh/src/client/proxy.rs at line 13
    [4.333093][3.633:667]()
    Child(tokio::process::Child),
    [4.333093]
    [4.333125]
    Child(std::process::Child),
  • replacement in thrussh/src/client/proxy.rs at line 36
    [4.333806][3.668:765]()
    Stream::Child(ref mut c) => Pin::new(c.stdout.as_mut().unwrap()).poll_read(cx, buf),
    [4.333806]
    [4.333897]
    Stream::Child(ref mut c) => {
    let n = c.stdout.as_mut().unwrap().read(buf.initialize_unfilled())?;
    buf.advance(n);
    Poll::Ready(Ok(()))
    }
  • replacement in thrussh/src/client/proxy.rs at line 53
    [4.334197][3.766:863]()
    Stream::Child(ref mut c) => Pin::new(c.stdin.as_mut().unwrap()).poll_write(cx, buf),
    [4.334197]
    [4.334288]
    Stream::Child(ref mut c) => Poll::Ready(c.stdin.as_mut().unwrap().write(buf)),
  • replacement in thrussh/src/client/proxy.rs at line 63
    [4.334536][3.864:956]()
    Stream::Child(ref mut c) => Pin::new(c.stdin.as_mut().unwrap()).poll_flush(cx),
    [4.334536]
    [4.334589]
    Stream::Child(_) => Poll::Ready(Ok(())),
  • replacement in thrussh/src/client/proxy.rs at line 73
    [4.334835][3.957:1052]()
    Stream::Child(ref mut c) => Pin::new(c.stdin.as_mut().unwrap()).poll_shutdown(cx),
    [4.334835]
    [4.334888]
    Stream::Child(_) => Poll::Ready(Ok(())),
  • edit in thrussh/src/client/mod.rs at line 978
    [4.365300][4.365300:365302]()
    }
  • edit in thrussh/src/client/mod.rs at line 979
    [4.365303][4.365303:365318]()
    impl Session {
  • edit in thrussh/src/client/mod.rs at line 1027
    [4.367201]
    [4.367201]
    }
    /// Send a `ChannelMsg` from the background handler to the client.
    pub fn send_channel_msg(&self, channel: ChannelId, msg: ChannelMsg) -> bool {
    if let Some(chan) = self.channels.get(&channel) {
    chan.send(OpenChannelMsg::Msg(msg)).unwrap_or(());
    true
    } else {
    false
    }
  • replacement in thrussh/Cargo.toml at line 5
    [4.426214][2.196:215]()
    version = "0.32.2"
    [4.426214]
    [4.426233]
    version = "0.32.4"