diff options
author | Roger Dingledine <arma@torproject.org> | 2004-08-04 02:15:22 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-08-04 02:15:22 +0000 |
commit | d0cfbcf87599ce258a24ee460a1cf33e26dc61e9 (patch) | |
tree | 1e51604d5abce4c93b411384f11251c8cee9afb2 | |
parent | 6466233add4d5a2a970f2d2a1772631c4ab90e4b (diff) | |
download | tor-d0cfbcf87599ce258a24ee460a1cf33e26dc61e9.tar.gz tor-d0cfbcf87599ce258a24ee460a1cf33e26dc61e9.zip |
only pick a default nickname if you're a server
svn:r2134
-rw-r--r-- | src/or/config.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c index 6ce47263bd..d9f9856ecf 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -680,9 +680,11 @@ int getconfig(int argc, char **argv, or_options_t *options) { } if (options->Nickname == NULL) { - if (!(options->Nickname = get_default_nickname())) - return -1; - log_fn(LOG_INFO, "Choosing default nickname %s", options->Nickname); + if(server_mode()) { + if (!(options->Nickname = get_default_nickname())) + return -1; + log_fn(LOG_NOTICE, "Choosing default nickname %s", options->Nickname); + } } else { if (strspn(options->Nickname, LEGAL_NICKNAME_CHARACTERS) != strlen(options->Nickname)) { @@ -696,7 +698,7 @@ int getconfig(int argc, char **argv, or_options_t *options) { } } - if(options->ORPort) { /* get an IP for ourselves */ + if(server_mode()) { /* get an IP for ourselves */ if(resolve_my_address(options) < 0) result = -1; } |