Fixed writechannel bug as described in ticket in #246, now closed
[openwrt/svn-archive/archive.git] / openwrt / package / dropbear / patches / 160-writechannel.patch
1 diff -urN dropbear-0.47.orig/common-channel.c dropbear-0.47/common-channel.c
2 --- dropbear-0.47.orig/common-channel.c 2005-12-09 06:42:31.000000000 +0100
3 +++ dropbear-0.47/common-channel.c 2006-02-05 00:03:37.000000000 +0100
4 @@ -377,7 +377,7 @@
5 cbuf_incrread(cbuf, len);
6 channel->recvdonelen += len;
7
8 - if (fd == channel->writefd && len == maxlen && channel->recveof) {
9 + if (fd == channel->writefd && len == maxlen && channel->recveof && cbuf_getused(channel->writebuf) == 0) {
10 /* Check if we're closing up */
11 closewritefd(channel);
12 TRACE(("leave writechannel: recveof set"))