Factor out all local SSH disconnections into a new function ssh_disconnect(),
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 21 May 2005 16:49:27 +0000 (16:49 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 21 May 2005 16:49:27 +0000 (16:49 +0000)
commit9e296bfa1190f3bb2aa9ebce308386e31eaf0898
treee331a9e751ae46d459ae53dfd680286756c280fb
parent4e95a413c2909c807226e5efc09da4c8ba24740e
Factor out all local SSH disconnections into a new function ssh_disconnect(),
and add the ability to treat a local disconnection as "unclean" -- notably, if
we can't agree any authentication methods to even try; someone was complaining
that the PuTTY window by default just disappears for no apparent reason in this
circumstance.

Also, use appropriate disconnect codes for those SSH2_MSG_DISCONNECT messages
that we do send.

I don't think I've seriously broken any user-visible behaviour, but the way
that connection-close distinctions are transmitted to the front-end is shaky
(or so it seems to me), so there may be non-ideal changes on some platforms.

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