160-tty_close.patch 750 B

1234567891011121314151617
  1. Index: dropbear-0.50/common-channel.c
  2. ===================================================================
  3. --- dropbear-0.50.orig/common-channel.c 2007-08-10 23:47:47.000000000 +0200
  4. +++ dropbear-0.50/common-channel.c 2007-08-10 23:47:50.000000000 +0200
  5. @@ -311,10 +311,10 @@
  6. send_msg_channel_eof(channel);
  7. }
  8. - /* And if we can't receive any more data from them either, close up */
  9. + /* And if we can't receive any more data from them either, close up (server only) */
  10. if (!channel->sent_close
  11. && channel->readfd == FD_CLOSED
  12. - && (ERRFD_IS_WRITE(channel) || channel->errfd == FD_CLOSED)
  13. + && !ERRFD_IS_WRITE(channel)
  14. && !write_pending(channel)) {
  15. TRACE(("sending close, readfd is closed"))
  16. send_msg_channel_close(channel);