Patch from Alan Ning (somewhat polished by me): introduce a flag
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Jul 2010 22:53:53 +0000 (22:53 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Jul 2010 22:53:53 +0000 (22:53 +0000)
commit78280721237452736c89a89866380e0673f29cb3
tree0283b637351cf6e6fbf4c577857dec3e652903e5
parentce3262cf6ddf5908eced52424c07682795f9523b
Patch from Alan Ning (somewhat polished by me): introduce a flag
called 'pending_close'. This deals with the situation in which we're
forwarding a port, have received and locally buffered some data from
the local endpoint but not yet been able to pass it down the SSH
connection due to window limitations, and then the local endpoint
closes its socket. In this situation what we've been doing until now
is to immediately send SSH2_MSG_CHANNEL_CLOSE, causing the data
still in our local buffer to be lost; now we instead set the new
flag, which will remind us to send SSH2_MSG_CHANNEL_CLOSE _after_ we
empty our bufchain.

Should fix at least one manifestation of 'portfwd-close', though I
don't know if it's the cause of all the reports we've ever seen.

git-svn-id: svn://svn.tartarus.org/sgt/putty@8971 cda61777-01e9-0310-a592-d414129be87e
ssh.c