mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12: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:
19
testback.c
19
testback.c
@ -1,4 +1,4 @@
|
||||
/* $Id: testback.c,v 1.5 2003/01/12 16:11:27 ben Exp $ */
|
||||
/* $Id: testback.c,v 1.6 2003/01/15 23:30:21 ben Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1999 Simon Tatham
|
||||
* Copyright (c) 1999 Ben Harris
|
||||
@ -35,6 +35,8 @@
|
||||
|
||||
static char *null_init(void *, void **, Config *, char *, int, char **, int);
|
||||
static char *loop_init(void *, void **, Config *, char *, int, char **, int);
|
||||
static void null_free(void *);
|
||||
static void loop_free(void *);
|
||||
static void null_reconfig(void *, Config *);
|
||||
static int null_send(void *, char *, int);
|
||||
static int loop_send(void *, char *, int);
|
||||
@ -50,13 +52,13 @@ static void null_provide_logctx(void *, void *);
|
||||
static void null_unthrottle(void *, int);
|
||||
|
||||
Backend null_backend = {
|
||||
null_init, null_reconfig, null_send, null_sendbuffer, null_size,
|
||||
null_init, null_free, null_reconfig, null_send, null_sendbuffer, null_size,
|
||||
null_special, null_socket, null_exitcode, null_sendok, null_ldisc,
|
||||
null_provide_ldisc, null_provide_logctx, null_unthrottle, 0
|
||||
};
|
||||
|
||||
Backend loop_backend = {
|
||||
loop_init, null_reconfig, loop_send, null_sendbuffer, null_size,
|
||||
loop_init, loop_free, null_reconfig, loop_send, null_sendbuffer, null_size,
|
||||
null_special, null_socket, null_exitcode, null_sendok, null_ldisc,
|
||||
null_provide_ldisc, null_provide_logctx, null_unthrottle, 0
|
||||
};
|
||||
@ -82,6 +84,17 @@ static char *loop_init(void *frontend_handle, void **backend_handle,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void null_free(void *handle)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void loop_free(void *handle)
|
||||
{
|
||||
|
||||
sfree(handle);
|
||||
}
|
||||
|
||||
static void null_reconfig(void *handle, Config *cfg) {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user