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:
10
telnet.c
10
telnet.c
@ -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,
|
||||
|
Reference in New Issue
Block a user