mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
make tor-resolve print the Tor version on --version too
svn:r3358
This commit is contained in:
parent
22a48e0a41
commit
372832d8fe
@ -181,6 +181,11 @@ main(int argc, char **argv)
|
|||||||
if (!n_args)
|
if (!n_args)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
if (!strcmp(arg[0],"--version")) {
|
||||||
|
printf("Tor version %s.\n",VERSION);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!strcmp("-v", arg[0])) {
|
if (!strcmp("-v", arg[0])) {
|
||||||
add_stream_log(LOG_DEBUG, LOG_ERR, "<stderr>", stderr);
|
add_stream_log(LOG_DEBUG, LOG_ERR, "<stderr>", stderr);
|
||||||
++arg; --n_args;
|
++arg; --n_args;
|
||||||
@ -213,7 +218,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
if (network_init()<0) {
|
if (network_init()<0) {
|
||||||
log_fn(LOG_ERR,"Error initializing network; exiting.");
|
log_fn(LOG_ERR,"Error initializing network; exiting.");
|
||||||
return -1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_resolve(arg[0], sockshost, socksport, &result))
|
if (do_resolve(arg[0], sockshost, socksport, &result))
|
||||||
|
Loading…
Reference in New Issue
Block a user