From 5c98a84fdd6485347d6001595b5fca0ad7af8ac6 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Wed, 16 Sep 2015 15:52:51 +0800 Subject: [PATCH] refine log --- src/local.c | 8 ++++---- src/redir.c | 8 ++++---- src/server.c | 8 ++++---- src/tunnel.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/local.c b/src/local.c index 0698a89f..3a995216 100644 --- a/src/local.c +++ b/src/local.c @@ -1090,10 +1090,6 @@ int main(int argc, char **argv) #endif } - if (auth) { - LOGI("onetime authentication enabled"); - } - #ifdef __MINGW32__ winsock_init(); #else @@ -1150,6 +1146,10 @@ int main(int argc, char **argv) ev_io_init(&listen_ctx.io, accept_cb, listenfd, EV_READ); ev_io_start(loop, &listen_ctx.io); + if (auth) { + LOGI("onetime authentication enabled"); + } + // Setup UDP if (mode != TCP_ONLY) { LOGI("udprelay enabled"); diff --git a/src/redir.c b/src/redir.c index d42d4eb7..569a94a2 100644 --- a/src/redir.c +++ b/src/redir.c @@ -740,10 +740,6 @@ int main(int argc, char **argv) daemonize(pid_path); } - if (auth) { - LOGI("onetime authentication enabled"); - } - // ignore SIGPIPE signal(SIGPIPE, SIG_IGN); signal(SIGABRT, SIG_IGN); @@ -790,6 +786,10 @@ int main(int argc, char **argv) ev_io_start(loop, &listen_ctx.io); } + if (auth) { + LOGI("onetime authentication enabled"); + } + // Setup UDP if (mode != TCP_ONLY) { LOGI("UDP relay enabled"); diff --git a/src/server.c b/src/server.c index aa3ad1ba..e4ae4415 100644 --- a/src/server.c +++ b/src/server.c @@ -1385,10 +1385,6 @@ int main(int argc, char **argv) #endif } - if (auth) { - LOGI("onetime authentication enabled"); - } - #ifdef __MINGW32__ winsock_init(); #else @@ -1475,6 +1471,10 @@ int main(int argc, char **argv) ev_timer_start(EV_DEFAULT, &stat_update_watcher); } + if (auth) { + LOGI("onetime authentication enabled"); + } + if (mode != TCP_ONLY) { LOGI("UDP relay enabled"); } diff --git a/src/tunnel.c b/src/tunnel.c index ad6cf13a..280df732 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -805,10 +805,6 @@ int main(int argc, char **argv) daemonize(pid_path); } - if (auth) { - LOGI("onetime authentication enabled"); - } - // parse tunnel addr parse_addr(tunnel_addr_str, &tunnel_addr); @@ -868,6 +864,10 @@ int main(int argc, char **argv) ev_io_start(loop, &listen_ctx.io); } + if (auth) { + LOGI("onetime authentication enabled"); + } + // Setup UDP if (mode != TCP_ONLY) { LOGI("UDP relay enabled");