mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -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
raw.c
10
raw.c
@ -123,6 +123,15 @@ static char *raw_init(void *frontend_handle, void **backend_handle,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void raw_free(void *handle)
|
||||
{
|
||||
Raw raw = (Raw) handle;
|
||||
|
||||
if (raw->s)
|
||||
sk_close(raw->s);
|
||||
sfree(raw);
|
||||
}
|
||||
|
||||
/*
|
||||
* Stub routine (we don't have any need to reconfigure this backend).
|
||||
*/
|
||||
@ -214,6 +223,7 @@ static int raw_exitcode(void *handle)
|
||||
|
||||
Backend raw_backend = {
|
||||
raw_init,
|
||||
raw_free,
|
||||
raw_reconfig,
|
||||
raw_send,
|
||||
raw_sendbuffer,
|
||||
|
Reference in New Issue
Block a user