[BACK]Return to channels.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/channels.c between version 1.157 and 1.158

version 1.157, 2002/01/09 17:16:00 version 1.158, 2002/01/09 17:26:35
Line 1270 
Line 1270 
                                 chan_mark_dead(c);                                  chan_mark_dead(c);
                                 return -1;                                  return -1;
                         } else if (compat13) {                          } else if (compat13) {
                                 buffer_consume(&c->output, buffer_len(&c->output));                                  buffer_clear(&c->output);
                                 c->type = SSH_CHANNEL_INPUT_DRAINING;                                  c->type = SSH_CHANNEL_INPUT_DRAINING;
                                 debug("channel %d: input draining.", c->self);                                  debug("channel %d: input draining.", c->self);
                         } else {                          } else {
Line 1312 
Line 1312 
                                 chan_mark_dead(c);                                  chan_mark_dead(c);
                                 return -1;                                  return -1;
                         } else if (compat13) {                          } else if (compat13) {
                                 buffer_consume(&c->output, buffer_len(&c->output));                                  buffer_clear(&c->output);
                                 debug("channel %d: input draining.", c->self);                                  debug("channel %d: input draining.", c->self);
                                 c->type = SSH_CHANNEL_INPUT_DRAINING;                                  c->type = SSH_CHANNEL_INPUT_DRAINING;
                         } else {                          } else {
Line 1425 
Line 1425 
                 len = write(c->sock, buffer_ptr(&c->output),                  len = write(c->sock, buffer_ptr(&c->output),
                             buffer_len(&c->output));                              buffer_len(&c->output));
                 if (len <= 0)                  if (len <= 0)
                         buffer_consume(&c->output, buffer_len(&c->output));                          buffer_clear(&c->output);
                 else                  else
                         buffer_consume(&c->output, len);                          buffer_consume(&c->output, len);
         }          }
Line 1828 
Line 1828 
                  * Not a closed channel - mark it as draining, which will                   * Not a closed channel - mark it as draining, which will
                  * cause it to be freed later.                   * cause it to be freed later.
                  */                   */
                 buffer_consume(&c->input, buffer_len(&c->input));                  buffer_clear(&c->input);
                 c->type = SSH_CHANNEL_OUTPUT_DRAINING;                  c->type = SSH_CHANNEL_OUTPUT_DRAINING;
         }          }
 }  }

Legend:
Removed from v.1.157  
changed lines
  Added in v.1.158