diff options
author | Roger Dingledine <arma@torproject.org> | 2006-03-26 06:51:26 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-03-26 06:51:26 +0000 |
commit | b899b9592a89281a05d5b4b7842de67d106303ab (patch) | |
tree | 13d94062519b87a12d082a32b702f6cd6509664b /src/or/test.c | |
parent | 0543900fbf8b69b6b7c0e5640cd2bfb5f6653d96 (diff) | |
download | tor-b899b9592a89281a05d5b4b7842de67d106303ab.tar.gz tor-b899b9592a89281a05d5b4b7842de67d106303ab.zip |
When the controller's *setconf commands fail, collect an error message
in a string and hand it back. This starts to resolve bug 275.
svn:r6241
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/test.c b/src/or/test.c index 2002c6a234..1fe62cdc96 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -1614,12 +1614,17 @@ int main(int c, char**v) { or_options_t *options = options_new(); + char *errmsg = NULL; options->command = CMD_RUN_UNITTESTS; network_init(); setup_directory(); options_init(options); options->DataDirectory = tor_strdup(temp_dir); - set_options(options); + if (set_options(options, &errmsg) < 0) { + printf("Failed to set initial options: %s\n", errmsg); + tor_free(errmsg); + return 1; + } crypto_seed_rng(); |