diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-07 18:11:10 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-07 18:11:10 +0000 |
commit | 4dae26be1c18fbaab59487036b239ecd47b40237 (patch) | |
tree | 9d1296618efd73367759ea35e1ee11213213e97f /src/uanytun.c | |
parent | minor cleanups (diff) |
--key and --salt have now higher priority than a passphrase
Diffstat (limited to 'src/uanytun.c')
-rw-r--r-- | src/uanytun.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/uanytun.c b/src/uanytun.c index e403d40..15e3238 100644 --- a/src/uanytun.c +++ b/src/uanytun.c @@ -322,16 +322,21 @@ void print_hex_dump(const u_int8_t* buf, u_int32_t len) int main(int argc, char* argv[]) { log_init("uanytun", DAEMON); + log_printf(NOTICE, "just started..."); signal_init(); options_t opt; int ret = options_parse(&opt, argc, argv); if(ret) { options_clear(&opt); - if(ret > 0) + if(ret > 0) { fprintf(stderr, "syntax error near: %s\n\n", argv[ret]); - if(ret == -2) + log_printf(ERR, "syntax error, exitting"); + } + if(ret == -2) { fprintf(stderr, "memory error on options_parse, exitting\n"); + log_printf(ERR, "memory error on options_parse, exitting"); + } if(ret == -1 || ret > 0) options_print_usage(); @@ -339,8 +344,6 @@ int main(int argc, char* argv[]) exit(ret); } - log_printf(NOTICE, "just started..."); - #ifndef NO_CRYPT #ifndef USE_SSL_CRYPTO ret = init_libgcrypt(); |