Fixing queues when sending a vector

[?]
Apr 28, 2021, 6:04 PM
EXXUR33QXBMJGW653BC75RQBIGNX5DDZ3XFHY3IGYQJIQ6AZVUZAC

Dependencies

  • [2] PBHNTGEX Fixing a channel window error
  • [3] F2FHFNIK Fixing the return value of session::data_noqueue
  • [4] JBFDZQ46 Formatting
  • [5] 7FRJYUI6 Reboot because of a bad change
  • [6] SJBZKVM5 Debug messages

Change contents

  • replacement in thrussh/src/session.rs at line 185
    [4.178062][4.178062:178382]()
    while let Some((buf, a, size)) = channel.pending_data.pop_front() {
    let (buf, size_) = Self::data_noqueue(&mut self.write, channel, buf, size);
    pending_size += size_;
    if size_ < buf.len() {
    channel.pending_data.push_front((buf, a, size_));
    [4.178062]
    [4.178382]
    while let Some((buf, a, from)) = channel.pending_data.pop_front() {
    let size = Self::data_noqueue(&mut self.write, channel, &buf, from);
    pending_size += size;
    if from + size < buf.len() {
    channel.pending_data.push_front((buf, a, from + size));
  • edit in thrussh/src/session.rs at line 205
    [4.178702]
    [4.178702]
    /// Push the largest amount of `&buf0[from..]` that can fit into
    /// the window, dividing it into packets if it is too large, and
    /// return the length that was written.
  • replacement in thrussh/src/session.rs at line 211
    [4.178785][4.178785:178810]()
    buf0: CryptoVec,
    [4.178785]
    [4.178810]
    buf0: &[u8],
  • replacement in thrussh/src/session.rs at line 213
    [4.178831][4.178831:178861]()
    ) -> (CryptoVec, usize) {
    [4.178831]
    [2.0]
    ) -> usize {
  • replacement in thrussh/src/session.rs at line 238
    [4.179741][3.0:31]()
    (buf0, from + buf_len)
    [4.179741]
    [4.179765]
    buf_len
  • replacement in thrussh/src/session.rs at line 248
    [4.180096][4.180096:180185]()
    let (buf0, buf_len) = Self::data_noqueue(&mut self.write, channel, buf0, 0);
    [4.180096]
    [4.180185]
    let buf_len = Self::data_noqueue(&mut self.write, channel, &buf0, 0);