refine commandline output

This commit is contained in:
Max Lv
2014-12-05 14:20:08 +08:00
parent 1a94c7b68f
commit dc066d5ceb
2 changed files with 16 additions and 10 deletions
+8 -5
View File
@@ -917,12 +917,7 @@ int main(int argc, char **argv)
switch (c) {
case 0:
if (option_index == 0) {
#ifdef TCP_FASTOPEN
fast_open = 1;
LOGD("using tcp fast open");
#else
LOGE("tcp fast open is not supported by this environment");
#endif
} else if (option_index == 1) {
LOGD("initialize acl...");
acl = !init_acl(optarg);
@@ -1042,6 +1037,14 @@ int main(int argc, char **argv)
daemonize(pid_path);
}
if (fast_open == 1) {
#ifdef TCP_FASTOPEN
LOGD("using tcp fast open");
#else
LOGE("tcp fast open is not supported by this environment");
#endif
}
#ifdef __MINGW32__
winsock_init();
#else
+8 -5
View File
@@ -941,12 +941,7 @@ int main(int argc, char **argv)
switch (c) {
case 0:
if (option_index == 0) {
#ifdef TCP_FASTOPEN
fast_open = 1;
LOGD("using tcp fast open");
#else
LOGE("tcp fast open is not supported by this environment");
#endif
}
break;
case 's':
@@ -1053,6 +1048,14 @@ int main(int argc, char **argv)
daemonize(pid_path);
}
if (fast_open == 1) {
#ifdef TCP_FASTOPEN
LOGD("using tcp fast open");
#else
LOGE("tcp fast open is not supported by this environment");
#endif
}
// ignore SIGPIPE
signal(SIGPIPE, SIG_IGN);
signal(SIGCHLD, SIG_IGN);