c85429ce892d6e3ba8733bd83c4e6c0487ddfb8b
[openwrt/svn-archive/archive.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,15 @@
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 + /* And if we can't receive any more data from them either, close up (server only) */
19 + if (!channel->sent_close
20 + && channel->readfd == FD_CLOSED
21 + && !ERRFD_IS_WRITE(channel)
22 + && !write_pending(channel)) {
23 + TRACE(("sending close, readfd is closed"))
24 + send_msg_channel_close(channel);
25 + }
26 }
27
28 /* Check whether a deferred (EINPROGRESS) connect() was successful, and