[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Implement --verify-config command-line option to fix bug 69.
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv21329/src/or
Modified Files:
config.c main.c or.h
Log Message:
Implement --verify-config command-line option to fix bug 69.
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.341
retrieving revision 1.342
diff -u -d -r1.341 -r1.342
--- config.c 4 May 2005 20:45:38 -0000 1.341
+++ config.c 7 May 2005 04:49:09 -0000 1.342
@@ -1799,6 +1799,8 @@
newoptions->command = CMD_HASH_PASSWORD;
newoptions->command_arg = tor_strdup( (i < argc-1) ? argv[i+1] : "");
++i;
+ } else if (!strcmp(argv[i],"--verify-config")) {
+ newoptions->command = CMD_VERIFY_CONFIG;
}
}
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.493
retrieving revision 1.494
diff -u -d -r1.493 -r1.494
--- main.c 6 May 2005 08:32:37 -0000 1.493
+++ main.c 7 May 2005 04:49:09 -0000 1.494
@@ -1409,6 +1409,9 @@
case CMD_HASH_PASSWORD:
do_hash_password();
break;
+ case CMD_VERIFY_CONFIG:
+ printf("Configuration was valid\n");
+ break;
default:
log_fn(LOG_ERR, "Illegal command number %d: internal error.", get_options()->command);
}
@@ -1594,6 +1597,9 @@
case CMD_HASH_PASSWORD:
do_hash_password();
break;
+ case CMD_VERIFY_CONFIG:
+ printf("Configuration was valid\n");
+ break;
default:
log_fn(LOG_ERR, "Illegal command number %d: internal error.",
get_options()->command);
Index: or.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.604
retrieving revision 1.605
diff -u -d -r1.604 -r1.605
--- or.h 3 May 2005 10:17:38 -0000 1.604
+++ or.h 7 May 2005 04:49:09 -0000 1.605
@@ -954,6 +954,7 @@
/** What should the tor process actually do? */
enum {
CMD_RUN_TOR=0, CMD_LIST_FINGERPRINT, CMD_HASH_PASSWORD,
+ CMD_VERIFY_CONFIG,
} command;
const char *command_arg; /**< Argument for command-line option. */