[or-cvs] [jtorctl/master] Fix bug that prevented postDescriptor from working
Sebastian Hahn
sebastian at torproject.org
Thu Mar 26 14:07:43 UTC 2009
Karsten noticed that postDescriptor doesn't work as intended. This
was caused by flushing too early inside sendAndWaitForResponse.
We need to wait until the escaped output has been written, too.
---
.../tor/control/TorControlConnection.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/freehaven/tor/control/TorControlConnection.java b/net/freehaven/tor/control/TorControlConnection.java
index fbeb5de..ffd7e5f 100644
--- a/net/freehaven/tor/control/TorControlConnection.java
+++ b/net/freehaven/tor/control/TorControlConnection.java
@@ -180,9 +180,9 @@ public class TorControlConnection implements TorControlCommands
debugOutput.print(">> "+s);
synchronized (waiters) {
output.write(s);
- output.flush();
if (rest != null)
writeEscaped(rest);
+ output.flush();
waiters.addLast(w);
}
List<ReplyLine> lst = w.getResponse();
--
1.5.6.5
More information about the tor-commits
mailing list