summaryrefslogtreecommitdiffhomepage
path: root/common-session.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-04-01 22:26:55 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-04-01 22:26:55 +0800
commit90b5691183f12d348d2651e026e8438ad278c2be (patch)
tree666eaed108e24b447ce27b42b9cbd5d574427972 /common-session.c
parent5af0d33164261fb9603d1b44f715d63659799373 (diff)
Run the cleanup handler also when we close due to TCP connection being closed
Diffstat (limited to 'common-session.c')
-rw-r--r--common-session.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common-session.c b/common-session.c
index ec5c9ed..b514796 100644
--- a/common-session.c
+++ b/common-session.c
@@ -234,7 +234,7 @@ void session_loop(void(*loophandler)()) {
}
/* clean up a session on exit */
-void common_session_cleanup() {
+void session_cleanup() {
TRACE(("enter session_cleanup"))
@@ -243,6 +243,10 @@ void common_session_cleanup() {
TRACE(("leave session_cleanup: !sessinitdone"))
return;
}
+
+ if (ses.extra_session_cleanup) {
+ ses.extra_session_cleanup();
+ }
m_free(ses.session_id);
m_burn(ses.keys, sizeof(struct key_context));