[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [jtorctl/master] Fix bug in parsing CIRC events.
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Mon, 18 May 2009 12:54:48 +0200
Subject: Fix bug in parsing CIRC events.
Commit: d818f4381e164273aadfcbff131da8e1a2cbc1f8
Asynchronous CIRC events don't contain a path when circuits have only been
launched. Don't try to parse the path for these events. Instead, pass an
empty string.
---
.../tor/control/TorControlConnection.java | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/freehaven/tor/control/TorControlConnection.java b/net/freehaven/tor/control/TorControlConnection.java
index ffd7e5f..076e7c5 100644
--- a/net/freehaven/tor/control/TorControlConnection.java
+++ b/net/freehaven/tor/control/TorControlConnection.java
@@ -209,7 +209,9 @@ public class TorControlConnection implements TorControlCommands
List<String> lst = Bytes.splitStr(null, rest);
handler.circuitStatus(lst.get(1),
lst.get(0),
- lst.get(2));
+ lst.get(1).equals("LAUNCHED")
+ || lst.size() < 2 ? ""
+ : lst.get(2));
} else if (tp.equals("STREAM")) {
List<String> lst = Bytes.splitStr(null, rest);
handler.streamStatus(lst.get(1),
--
1.5.6.5