[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] fix most torctl issues; move rest into TODO
Update of /home/or/cvsroot/control/java/net/freehaven/tor/control/examples
In directory moria:/tmp/cvs-serv6984/java/net/freehaven/tor/control/examples
Modified Files:
Main.java
Log Message:
fix most torctl issues; move rest into TODO
Index: Main.java
===================================================================
RCS file: /home/or/cvsroot/control/java/net/freehaven/tor/control/examples/Main.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Main.java 24 Jun 2005 18:03:27 -0000 1.3
+++ Main.java 14 Jul 2005 20:26:11 -0000 1.4
@@ -7,6 +7,7 @@
import java.io.PrintWriter;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.List;
import java.util.Arrays;
import java.util.Map;
import java.util.Iterator;
@@ -83,11 +84,11 @@
public static void getConfig(String[] args) throws IOException {
// Usage: get-config key key key
TorControlConnection conn = getConnection(args);
- Map m = conn.getConf(Arrays.asList(args).subList(1,args.length));
- for (Iterator i = m.entrySet().iterator(); i.hasNext(); ) {
- Map.Entry e = (Map.Entry) i.next();
- System.out.println("KEY: "+e.getKey());
- System.out.println("VAL: "+e.getValue());
+ List lst = conn.getConf(Arrays.asList(args).subList(1,args.length));
+ for (Iterator i = lst.iterator(); i.hasNext(); ) {
+ ConfigEntry e = (ConfigEntry) i.next();
+ System.out.println("KEY: "+e.key);
+ System.out.println("VAL: "+e.value);
}
}