Better handling of outstanding CHANNEL_REQUESTS on channel destruction.
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sat, 25 Aug 2012 21:06:48 +0000 (21:06 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sat, 25 Aug 2012 21:06:48 +0000 (21:06 +0000)
commit3620f307749e6d295ae88d19680eca8704fa79c8
tree29a3e46f94ef7af5ff9561cb84e47d01963014b3
parent134f5ecef908ba0933d2de0ecba207de0126cffc
Better handling of outstanding CHANNEL_REQUESTS on channel destruction.

Part the first: make sure that all structures describing channel
requests are freed when the SSH connection is freed.  This involves
adding a means to ask a response handler to free any memory it holds.

Part the second: in ssh_channel_try_eof(), call
ssh2_channel_check_close() rather than emitting an SSH_MSG_CHANNEL_EOF
directly.  This avoids the possibility of closing the channel while a
CHANNEL_REQUEST is outstanding.

Also add some assertions that helped with tracking down the latter
problem.

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