diff options
-rw-r--r-- | src/tools/tor-resolve.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index f269ee63b..65a6300cf 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -181,6 +181,11 @@ main(int argc, char **argv) if (!n_args) usage(); + if (!strcmp(arg[0],"--version")) { + printf("Tor version %s.\n",VERSION); + return 0; + } + if (!strcmp("-v", arg[0])) { add_stream_log(LOG_DEBUG, LOG_ERR, "<stderr>", stderr); ++arg; --n_args; @@ -213,7 +218,7 @@ main(int argc, char **argv) if (network_init()<0) { log_fn(LOG_ERR,"Error initializing network; exiting."); - return -1; + return 1; } if (do_resolve(arg[0], sockshost, socksport, &result)) |