[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] make tor-resolve print the Tor version on --version too



Update of /home2/or/cvsroot/tor/src/tools
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/tools

Modified Files:
	tor-resolve.c 
Log Message:
make tor-resolve print the Tor version on --version too


Index: tor-resolve.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/tools/tor-resolve.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- tor-resolve.c	22 Dec 2004 05:29:06 -0000	1.13
+++ tor-resolve.c	16 Jan 2005 02:21:14 -0000	1.14
@@ -181,6 +181,11 @@
   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 @@
 
   if (network_init()<0) {
     log_fn(LOG_ERR,"Error initializing network; exiting.");
-    return -1;
+    return 1;
   }
 
   if (do_resolve(arg[0], sockshost, socksport, &result))