[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] bugfix: close_immediate called buf_clear but listeners don"...



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	connection.c 
Log Message:
bugfix: close_immediate called buf_clear but listeners don't have bufs


Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- connection.c	2 Mar 2004 07:24:11 -0000	1.168
+++ connection.c	3 Mar 2004 01:58:45 -0000	1.169
@@ -155,8 +155,10 @@
   }
   close(conn->s);
   conn->s = -1;
-  buf_clear(conn->outbuf);
-  conn->outbuf_flushlen = 0;
+  if(!connection_is_listener(conn)) {
+    buf_clear(conn->outbuf);
+    conn->outbuf_flushlen = 0;
+  }
 }
 
 int