projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the ability to close sessions. This adds *_free() functions to most
[u/mdw/putty]
/
ldisc.c
diff --git
a/ldisc.c
b/ldisc.c
index
c77b5c8
..
7b3976e
100644
(file)
--- a/
ldisc.c
+++ b/
ldisc.c
@@
-87,6
+87,19
@@
void *ldisc_create(Config *mycfg, Terminal *term,
return ldisc;
}
return ldisc;
}
+void ldisc_free(void *handle)
+{
+ Ldisc ldisc = (Ldisc) handle;
+
+ if (ldisc->term)
+ ldisc->term->ldisc = NULL;
+ if (ldisc->back)
+ ldisc->back->provide_ldisc(ldisc->backhandle, NULL);
+ if (ldisc->buf)
+ sfree(ldisc->buf);
+ sfree(ldisc);
+}
+
void ldisc_send(void *handle, char *buf, int len, int interactive)
{
Ldisc ldisc = (Ldisc) handle;
void ldisc_send(void *handle, char *buf, int len, int interactive)
{
Ldisc ldisc = (Ldisc) handle;