diff options
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(); |