mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
only pick a default nickname if you're a server
svn:r2134
This commit is contained in:
parent
6466233add
commit
d0cfbcf875
@ -680,9 +680,11 @@ int getconfig(int argc, char **argv, or_options_t *options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options->Nickname == NULL) {
|
if (options->Nickname == NULL) {
|
||||||
if (!(options->Nickname = get_default_nickname()))
|
if(server_mode()) {
|
||||||
return -1;
|
if (!(options->Nickname = get_default_nickname()))
|
||||||
log_fn(LOG_INFO, "Choosing default nickname %s", options->Nickname);
|
return -1;
|
||||||
|
log_fn(LOG_NOTICE, "Choosing default nickname %s", options->Nickname);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (strspn(options->Nickname, LEGAL_NICKNAME_CHARACTERS) !=
|
if (strspn(options->Nickname, LEGAL_NICKNAME_CHARACTERS) !=
|
||||||
strlen(options->Nickname)) {
|
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)
|
if(resolve_my_address(options) < 0)
|
||||||
result = -1;
|
result = -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user