diff channel.h @ 652:17962b2a6b8f

- Make sure we don't use channel-specific data after it has been freed with a ChanType->closehandler()
author Matt Johnston <matt@ucc.asn.au>
date Sun, 04 Dec 2011 05:27:29 +0800
parents cf376c696dfc
children 564e7f87ecc3
line wrap: on
line diff
--- a/channel.h	Sun Dec 04 05:24:50 2011 +0800
+++ b/channel.h	Sun Dec 04 05:27:29 2011 +0800
@@ -69,6 +69,10 @@
 	int sent_close, recv_close;
 	int recv_eof, sent_eof;
 
+	/* Set after running the ChanType-specific close hander
+	 * to ensure we don't run it twice (nor type->checkclose()). */
+	int close_handler_done;
+
 	int initconn; /* used for TCP forwarding, whether the channel has been
 					 fully initialised */