prevent dropbear from closing the tty prematurely if the readfd closes
[openwrt-10.03/.git] / package / dropbear / patches / 160-tty_close.patch
1 diff -ur db.old/common-channel.c db.dev/common-channel.c
2 --- db.old/common-channel.c     2007-02-22 17:17:15.000000000 +0100
3 +++ db.dev/common-channel.c     2007-05-06 19:50:19.154943528 +0200
4 @@ -309,15 +309,6 @@
5                         && (ERRFD_IS_WRITE(channel) || channel->errfd == FD_CLOSED)) {
6                 send_msg_channel_eof(channel);
7         }
8 -
9 -       /* And if we can't receive any more data from them either, close up */
10 -       if (!channel->sent_close
11 -                       && channel->readfd == FD_CLOSED
12 -                       && (ERRFD_IS_WRITE(channel) || channel->errfd == FD_CLOSED)
13 -                       && !write_pending(channel)) {
14 -               TRACE(("sending close, readfd is closed"))
15 -               send_msg_channel_close(channel);
16 -       }
17  }
18  
19  /* Check whether a deferred (EINPROGRESS) connect() was successful, and