diff channel.h @ 707:564e7f87ecc3

Fix memory leak when direct TCP connections time out on connection. Long-standing bug probably stemming from the awkwardly named delete_channel() versus remove_channel()
author Matt Johnston <matt@ucc.asn.au>
date Tue, 19 Mar 2013 23:54:32 +0800
parents 17962b2a6b8f
children 4a274f47eabd
line wrap: on
line diff
--- a/channel.h	Tue Mar 19 20:55:11 2013 +0800
+++ b/channel.h	Tue Mar 19 23:54:32 2013 +0800
@@ -61,7 +61,8 @@
 	int readfd; /* read from insecure side, written to wire */
 	int errfd; /* used like writefd or readfd, depending if it's client or server.
 				  Doesn't exactly belong here, but is cleaner here */
-	circbuffer *writebuf; /* data from the wire, for local consumption */
+	circbuffer *writebuf; /* data from the wire, for local consumption. Can be
+							 initially NULL */
 	circbuffer *extrabuf; /* extended-data for the program - used like writebuf
 					     but for stderr */
 
@@ -102,9 +103,6 @@
 void setchannelfds(fd_set *readfd, fd_set *writefd);
 void channelio(fd_set *readfd, fd_set *writefd);
 struct Channel* getchannel();
-struct Channel* newchannel(unsigned int remotechan, 
-		const struct ChanType *type, 
-		unsigned int transwindow, unsigned int transmaxpacket);
 
 void recv_msg_channel_open();
 void recv_msg_channel_request();