1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Add the ability to close sessions. This adds *_free() functions to most

areas of the code.  Not all back-ends have been tested, but Telnet and SSH
behave reasonably.

Incidentally, almost all of this patch was written through Mac PuTTY,
admittedly over a Telnet connection.

[originally from svn r2615]
This commit is contained in:
Ben Harris
2003-01-15 23:30:21 +00:00
parent 7a9c7f3d68
commit 694aafa071
14 changed files with 196 additions and 12 deletions

View File

@ -740,6 +740,15 @@ static char *telnet_init(void *frontend_handle, void **backend_handle,
return NULL;
}
static void telnet_free(void *handle)
{
Telnet telnet = (Telnet) handle;
sfree(telnet->sb_buf);
if (telnet->s)
sk_close(telnet->s);
sfree(telnet);
}
/*
* Reconfigure the Telnet backend. There's no immediate action
* necessary, in this backend: we just save the fresh config for
@ -974,6 +983,7 @@ static int telnet_exitcode(void *handle)
Backend telnet_backend = {
telnet_init,
telnet_free,
telnet_reconfig,
telnet_send,
telnet_sendbuffer,