[or-cvs] be flexible in what you accept: when people type "tor --ins...

arma at seul.org arma at seul.org
Sat Jul 9 03:29:01 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	main.c 
Log Message:
be flexible in what you accept: when people type "tor --install" thinking
they had typed "tor -install", make it work too.


Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.522
retrieving revision 1.523
diff -u -d -r1.522 -r1.523
--- main.c	27 Jun 2005 23:35:04 -0000	1.522
+++ main.c	9 Jul 2005 03:28:58 -0000	1.523
@@ -1672,13 +1672,15 @@
 #ifdef MS_WINDOWS_SERVICE
   backup_argv = argv;
   backup_argc = argc;
-  if ((argc >= 2) && !strcmp(argv[1], "-install"))
-    return nt_service_install();
-  if ((argc >= 2) && !strcmp(argv[1], "-remove"))
-    return nt_service_remove();
-  if ((argc >= 2) && !strcmp(argv[1], "--nt-service")) {
-    nt_service_main();
-    return 0;
+  if (argc >= 2) {
+    if (!strcmp(argv[1], "-install") || !strcmp(argv[1], "--install"))
+      return nt_service_install();
+    if (!strcmp(argv[1], "-remove") || !strcmp(argv[1], "--remove"))
+      return nt_service_remove();
+    if (!strcmp(argv[1], "-nt-service") || !strcmp(argv[1], "--nt-service")) {
+      nt_service_main();
+      return 0;
+    }
   }
 #endif
   if (tor_init(argc, argv)<0)



More information about the tor-commits mailing list