[or-cvs] Implement resetConf in controller libraries

Nick Mathewson nickm at seul.org
Tue Sep 27 17:36:40 UTC 2005


Update of /home/or/cvsroot/control/doc
In directory moria:/tmp/cvs-serv30265/doc

Modified Files:
	howto.txt 
Log Message:
Implement resetConf in controller libraries

Index: howto.txt
===================================================================
RCS file: /home/or/cvsroot/control/doc/howto.txt,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- howto.txt	16 Aug 2005 03:22:30 -0000	1.7
+++ howto.txt	27 Sep 2005 17:36:38 -0000	1.8
@@ -109,6 +109,10 @@
               "HiddenServiceDir /home/tor/service1",
               "HiddenServicePort 80",
        }));
+       // Reset some variables to their defaults
+       conn.resetConf(Arrays.asList(new String[]{
+              "contact", "socksport"
+       }));
        // Flush the configuration to disk.
        conn.saveConf();
 
@@ -117,13 +121,15 @@
        options = conn.get_option("contact")
        # Get a set of configuration variables.
        options = conn.get_option(["contact", "orport", "socksport"])
-       // Change a single configuration variable
+       # Change a single configuration variable
        conn.set_option("BandwidthRate", "1 MB")
-       // Change several configuration variables
+       # Change several configuration variables
        conn.set_option([
               ("HiddenServiceDir", "/home/tor/service1"),
               ("HiddenServicePort", "80")])
-       // Flush the configuration to disk.
+       # Reset some variables to their defaults.
+       conn.reset_options(["contact", "socksport"])
+       # Flush the configuration to disk.
        conn.save_conf()
 
    Talking to Tor directly:



More information about the tor-commits mailing list