aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-07-18 14:38:31 -0400
committerNick Mathewson <nickm@torproject.org>2013-07-18 14:40:12 -0400
commitf45e1fbd5b25735c75bed8767d9d50e279c4b63a (patch)
treeed755a43790fa2b93ee0f932e00fc81fc82197c4 /src/or/config.c
parentabedd35de08f2a2bd91d9d17e2f3cfd3b42ba52a (diff)
downloadtor-f45e1fbd5b25735c75bed8767d9d50e279c4b63a.tar
tor-f45e1fbd5b25735c75bed8767d9d50e279c4b63a.tar.gz
Start of a unit test for options_validate.
I added this so I could write a unit test for ServerTransportOptions, but it incidentally exercises the succeed-on-defaults case of options_validate too.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 4ddced8a6..2218e5078 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -9,6 +9,7 @@
* \brief Code to parse and interpret configuration files.
**/
+#define CONFIG_PRIVATE
#include "or.h"
#include "addressmap.h"
#include "channel.h"
@@ -509,10 +510,6 @@ static const config_var_t testing_tor_network_defaults[] = {
#ifdef _WIN32
static char *get_windows_conf_root(void);
#endif
-static int options_validate(or_options_t *old_options,
- or_options_t *options,
- or_options_t *default_options,
- int from_setconf, char **msg);
static int options_act_reversible(const or_options_t *old_options, char **msg);
static int options_act(const or_options_t *old_options);
static int options_transition_allowed(const or_options_t *old,
@@ -556,7 +553,7 @@ static void config_maybe_load_geoip_files_(const or_options_t *options,
#define OR_OPTIONS_MAGIC 9090909
/** Configuration format for or_options_t. */
-static config_format_t options_format = {
+STATIC config_format_t options_format = {
sizeof(or_options_t),
OR_OPTIONS_MAGIC,
STRUCT_OFFSET(or_options_t, magic_),
@@ -712,7 +709,7 @@ get_short_version(void)
/** Release additional memory allocated in options
*/
-static void
+STATIC void
or_options_free(or_options_t *options)
{
if (!options)
@@ -2349,7 +2346,7 @@ compute_publishserverdescriptor(or_options_t *options)
* Log line should stay empty. If it's 0, then give us a default log
* if there are no logs defined.
*/
-static int
+STATIC int
options_validate(or_options_t *old_options, or_options_t *options,
or_options_t *default_options, int from_setconf, char **msg)
{