diff common-session.c @ 733:70811267715c

Run the cleanup handler also when we close due to TCP connection being closed
author Matt Johnston <matt@ucc.asn.au>
date Mon, 01 Apr 2013 22:26:55 +0800
parents 78eda530c000
children 685d05f1cc5c
line wrap: on
line diff
--- a/common-session.c	Mon Apr 01 22:26:24 2013 +0800
+++ b/common-session.c	Mon Apr 01 22:26:55 2013 +0800
@@ -234,7 +234,7 @@
 }
 
 /* clean up a session on exit */
-void common_session_cleanup() {
+void session_cleanup() {
 	
 	TRACE(("enter session_cleanup"))
 	
@@ -243,6 +243,10 @@
 		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));