]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Abstracted out the rather large port-forwarding setup code into a
authorSimon Tatham <anakin@pobox.com>
Tue, 28 Dec 2004 14:04:58 +0000 (14:04 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 28 Dec 2004 14:04:58 +0000 (14:04 +0000)
commit67f93aa30e905277226ffe557e71b335c640664b
tree0238c3c5d95e625bbc54539598cde76a15e91a31
parentac61490a5b9f40a3655d363d5a1014112aae7222
Abstracted out the rather large port-forwarding setup code into a
routine which is common between SSH1 and SSH2. Since this routine is
not part of the coroutine system, this means it can't sit and wait
to get its various success/failure responses back. Hence, I've
introduced a system of queued packet handlers, each of which waits
for exactly one of a pair of messages (SSH1_SMSG_{SUCCESS,FAILURE}
or SSH2_MSG_REQUEST_{SUCCESS,FAILURE}), handles it when it arrives,
and automatically de-registers itself. Hence the port-forwarding
setup code can be called once, and then subsequent packets related
to it will automatically be handled as they arrive.

The real purpose of all this is that the infrastructure is now there
for me to arrange mid-session configurability of port forwarding.
However, a side benefit is that fewer round trips are involved in
session startup. I'd quite like to move more of the connection setup
(X forwarding, agent forwarding, pty allocation etc) to using the
new queued handler mechanism for this reason.

[originally from svn r5029]
ssh.c