diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-01-18 10:21:33 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-23 16:06:51 -0500 |
commit | 83307fc267e7de5fd3a9ccc0c51d6d377f454495 (patch) | |
tree | 71377fe9c8a4d3180f783cfb160bda6c2caefd17 /src | |
parent | 9469aaaa82b353655c8e17f654954231ba3b09c8 (diff) | |
download | tor-83307fc267e7de5fd3a9ccc0c51d6d377f454495.tar.gz tor-83307fc267e7de5fd3a9ccc0c51d6d377f454495.zip |
Add __SocksPort etc variants for non-persistent use
Implements feature 20956.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c index 3b70b979f7..fe6aa786e7 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -133,8 +133,17 @@ static config_abbrev_t option_abbrevs_[] = { /** An entry for config_vars: "The option <b>name</b> is obsolete." */ #define OBSOLETE(name) { name, CONFIG_TYPE_OBSOLETE, 0, NULL } -#define VPORT(member) \ - VAR(#member, LINELIST, member ## _lines, NULL) +/** + * Macro to declare *Port options. Each one comes in three entries. + * For example, most users should use "SocksPort" to configure the + * socks port, but TorBrowser wants to use __SocksPort so that it + * isn't stored by SAVECONF. The SocksPortLines virtual option is + * used to query both options from the controller. + */ +#define VPORT(member) \ + VAR(#member "Lines", LINELIST_V, member ## _lines, NULL), \ + VAR(#member, LINELIST_S, member ## _lines, NULL), \ + VAR("__" #member, LINELIST_S, member ## _lines, NULL) /** Array of configuration options. Until we disallow nonstandard * abbreviations, order is significant, since the first matching option will |