summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-07-09 03:28:58 +0000
committerRoger Dingledine <arma@torproject.org>2005-07-09 03:28:58 +0000
commit2f1f0c8d2155ef5f63c0598c0175131995e0e9a7 (patch)
treec5c9fe7d01d0a52bdf296da311222479a14080f8
parent0a37e9522d4bfe51ec73f01fc9548dcd1c1e9bc9 (diff)
downloadtor-2f1f0c8d2155ef5f63c0598c0175131995e0e9a7.tar.gz
tor-2f1f0c8d2155ef5f63c0598c0175131995e0e9a7.zip
be flexible in what you accept: when people type "tor --install" thinking
they had typed "tor -install", make it work too. svn:r4526
-rw-r--r--src/or/main.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/or/main.c b/src/or/main.c
index c5d9406b07..e0427b8cf5 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1672,13 +1672,15 @@ tor_main(int argc, char *argv[])
#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)