[or-cvs] [tor/maint-0.2.1] Flush long replies over control port on QUIT

Nick Mathewson nickm at seul.org
Wed Jun 24 23:01:44 UTC 2009


Author: Marcus Griep <marcus at griep.us>
Date: Tue, 23 Jun 2009 23:09:27 -0400
Subject: Flush long replies over control port on QUIT
Commit: fa89c9f0868d4902e0298ac9ef23e521633f933b

Marks the control port connection for flushing before closing when
the QUIT command is issued. This allows a QUIT to be issued during
a long reply over the control port, flushing the reply and then
closing the connection. Fixes bug 1015.
---
 src/or/control.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/or/control.c b/src/or/control.c
index 486ccc4..98c6aa4 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2892,6 +2892,7 @@ connection_control_process_inbuf(control_connection_t *conn)
   if (!strcasecmp(conn->incoming_cmd, "QUIT")) {
     connection_write_str_to_buf("250 closing connection\r\n", conn);
     connection_mark_for_close(TO_CONN(conn));
+    conn->_base.hold_open_until_flushed = 1;
     return 0;
   }
 
-- 
1.5.6.5




More information about the tor-commits mailing list