Commit 3dd738d5 authored by Nick Mathewson's avatar Nick Mathewson 🎨
Browse files

Simplify the VPORT() macro in config.c

It's always called with the same arguments, and there wouldn't be
much point to calling it differently.
parent 0809690b
...@@ -133,8 +133,8 @@ static config_abbrev_t option_abbrevs_[] = { ...@@ -133,8 +133,8 @@ static config_abbrev_t option_abbrevs_[] = {
/** An entry for config_vars: "The option <b>name</b> is obsolete." */ /** An entry for config_vars: "The option <b>name</b> is obsolete." */
#define OBSOLETE(name) { name, CONFIG_TYPE_OBSOLETE, 0, NULL } #define OBSOLETE(name) { name, CONFIG_TYPE_OBSOLETE, 0, NULL }
#define VPORT(member,conftype,initvalue) \ #define VPORT(member) \
VAR(#member, conftype, member ## _lines, initvalue) VAR(#member, LINELIST, member ## _lines, NULL)
/** Array of configuration options. Until we disallow nonstandard /** Array of configuration options. Until we disallow nonstandard
* abbreviations, order is significant, since the first matching option will * abbreviations, order is significant, since the first matching option will
...@@ -203,7 +203,7 @@ static config_var_t option_vars_[] = { ...@@ -203,7 +203,7 @@ static config_var_t option_vars_[] = {
V(ConstrainedSockSize, MEMUNIT, "8192"), V(ConstrainedSockSize, MEMUNIT, "8192"),
V(ContactInfo, STRING, NULL), V(ContactInfo, STRING, NULL),
V(ControlListenAddress, LINELIST, NULL), V(ControlListenAddress, LINELIST, NULL),
VPORT(ControlPort, LINELIST, NULL), VPORT(ControlPort),
V(ControlPortFileGroupReadable,BOOL, "0"), V(ControlPortFileGroupReadable,BOOL, "0"),
V(ControlPortWriteToFile, FILENAME, NULL), V(ControlPortWriteToFile, FILENAME, NULL),
V(ControlSocket, LINELIST, NULL), V(ControlSocket, LINELIST, NULL),
...@@ -221,7 +221,7 @@ static config_var_t option_vars_[] = { ...@@ -221,7 +221,7 @@ static config_var_t option_vars_[] = {
V(TestingAuthDirTimeToLearnReachability, INTERVAL, "30 minutes"), V(TestingAuthDirTimeToLearnReachability, INTERVAL, "30 minutes"),
V(DirListenAddress, LINELIST, NULL), V(DirListenAddress, LINELIST, NULL),
V(DirPolicy, LINELIST, NULL), V(DirPolicy, LINELIST, NULL),
VPORT(DirPort, LINELIST, NULL), VPORT(DirPort),
V(DirPortFrontPage, FILENAME, NULL), V(DirPortFrontPage, FILENAME, NULL),
VAR("DirReqStatistics", BOOL, DirReqStatistics_option, "1"), VAR("DirReqStatistics", BOOL, DirReqStatistics_option, "1"),
VAR("DirAuthority", LINELIST, DirAuthorities, NULL), VAR("DirAuthority", LINELIST, DirAuthorities, NULL),
...@@ -232,7 +232,7 @@ static config_var_t option_vars_[] = { ...@@ -232,7 +232,7 @@ static config_var_t option_vars_[] = {
OBSOLETE("DisableIOCP"), OBSOLETE("DisableIOCP"),
OBSOLETE("DisableV2DirectoryInfo_"), OBSOLETE("DisableV2DirectoryInfo_"),
OBSOLETE("DynamicDHGroups"), OBSOLETE("DynamicDHGroups"),
VPORT(DNSPort, LINELIST, NULL), VPORT(DNSPort),
V(DNSListenAddress, LINELIST, NULL), V(DNSListenAddress, LINELIST, NULL),
V(DownloadExtraInfo, BOOL, "0"), V(DownloadExtraInfo, BOOL, "0"),
V(TestingEnableConnBwEvent, BOOL, "0"), V(TestingEnableConnBwEvent, BOOL, "0"),
...@@ -252,7 +252,7 @@ static config_var_t option_vars_[] = { ...@@ -252,7 +252,7 @@ static config_var_t option_vars_[] = {
V(ExitPortStatistics, BOOL, "0"), V(ExitPortStatistics, BOOL, "0"),
V(ExtendAllowPrivateAddresses, BOOL, "0"), V(ExtendAllowPrivateAddresses, BOOL, "0"),
V(ExitRelay, AUTOBOOL, "auto"), V(ExitRelay, AUTOBOOL, "auto"),
VPORT(ExtORPort, LINELIST, NULL), VPORT(ExtORPort),
V(ExtORPortCookieAuthFile, STRING, NULL), V(ExtORPortCookieAuthFile, STRING, NULL),
V(ExtORPortCookieAuthFileGroupReadable, BOOL, "0"), V(ExtORPortCookieAuthFileGroupReadable, BOOL, "0"),
V(ExtraInfoStatistics, BOOL, "1"), V(ExtraInfoStatistics, BOOL, "1"),
...@@ -338,7 +338,7 @@ static config_var_t option_vars_[] = { ...@@ -338,7 +338,7 @@ static config_var_t option_vars_[] = {
V(NewCircuitPeriod, INTERVAL, "30 seconds"), V(NewCircuitPeriod, INTERVAL, "30 seconds"),
OBSOLETE("NamingAuthoritativeDirectory"), OBSOLETE("NamingAuthoritativeDirectory"),
V(NATDListenAddress, LINELIST, NULL), V(NATDListenAddress, LINELIST, NULL),
VPORT(NATDPort, LINELIST, NULL), VPORT(NATDPort),
V(Nickname, STRING, NULL), V(Nickname, STRING, NULL),
V(PredictedPortsRelevanceTime, INTERVAL, "1 hour"), V(PredictedPortsRelevanceTime, INTERVAL, "1 hour"),
V(WarnUnsafeSocks, BOOL, "1"), V(WarnUnsafeSocks, BOOL, "1"),
...@@ -348,7 +348,7 @@ static config_var_t option_vars_[] = { ...@@ -348,7 +348,7 @@ static config_var_t option_vars_[] = {
V(NumEntryGuards, UINT, "0"), V(NumEntryGuards, UINT, "0"),
V(OfflineMasterKey, BOOL, "0"), V(OfflineMasterKey, BOOL, "0"),
V(ORListenAddress, LINELIST, NULL), V(ORListenAddress, LINELIST, NULL),
VPORT(ORPort, LINELIST, NULL), VPORT(ORPort),
V(OutboundBindAddress, LINELIST, NULL), V(OutboundBindAddress, LINELIST, NULL),
OBSOLETE("PathBiasDisableRate"), OBSOLETE("PathBiasDisableRate"),
...@@ -420,7 +420,7 @@ static config_var_t option_vars_[] = { ...@@ -420,7 +420,7 @@ static config_var_t option_vars_[] = {
V(ShutdownWaitLength, INTERVAL, "30 seconds"), V(ShutdownWaitLength, INTERVAL, "30 seconds"),
V(SocksListenAddress, LINELIST, NULL), V(SocksListenAddress, LINELIST, NULL),
V(SocksPolicy, LINELIST, NULL), V(SocksPolicy, LINELIST, NULL),
VPORT(SocksPort, LINELIST, NULL), VPORT(SocksPort),
V(SocksTimeout, INTERVAL, "2 minutes"), V(SocksTimeout, INTERVAL, "2 minutes"),
V(SSLKeyLifetime, INTERVAL, "0"), V(SSLKeyLifetime, INTERVAL, "0"),
OBSOLETE("StrictEntryNodes"), OBSOLETE("StrictEntryNodes"),
...@@ -435,7 +435,7 @@ static config_var_t option_vars_[] = { ...@@ -435,7 +435,7 @@ static config_var_t option_vars_[] = {
V(TrackHostExits, CSV, NULL), V(TrackHostExits, CSV, NULL),
V(TrackHostExitsExpire, INTERVAL, "30 minutes"), V(TrackHostExitsExpire, INTERVAL, "30 minutes"),
V(TransListenAddress, LINELIST, NULL), V(TransListenAddress, LINELIST, NULL),
VPORT(TransPort, LINELIST, NULL), VPORT(TransPort),
V(TransProxyType, STRING, "default"), V(TransProxyType, STRING, "default"),
OBSOLETE("TunnelDirConns"), OBSOLETE("TunnelDirConns"),
V(UpdateBridgesFromAuthority, BOOL, "0"), V(UpdateBridgesFromAuthority, BOOL, "0"),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment