Browse Source

refine commandline output

pull/178/head
Max Lv 10 years ago
parent
commit
dc066d5ceb
2 changed files with 16 additions and 10 deletions
  1. 13
      src/local.c
  2. 13
      src/server.c

13
src/local.c

@ -917,12 +917,7 @@ int main(int argc, char **argv)
switch (c) { switch (c) {
case 0: case 0:
if (option_index == 0) { if (option_index == 0) {
#ifdef TCP_FASTOPEN
fast_open = 1; 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) { } else if (option_index == 1) {
LOGD("initialize acl..."); LOGD("initialize acl...");
acl = !init_acl(optarg); acl = !init_acl(optarg);
@ -1042,6 +1037,14 @@ int main(int argc, char **argv)
daemonize(pid_path); 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__ #ifdef __MINGW32__
winsock_init(); winsock_init();
#else #else

13
src/server.c

@ -941,12 +941,7 @@ int main(int argc, char **argv)
switch (c) { switch (c) {
case 0: case 0:
if (option_index == 0) { if (option_index == 0) {
#ifdef TCP_FASTOPEN
fast_open = 1; fast_open = 1;
LOGD("using tcp fast open");
#else
LOGE("tcp fast open is not supported by this environment");
#endif
} }
break; break;
case 's': case 's':
@ -1053,6 +1048,14 @@ int main(int argc, char **argv)
daemonize(pid_path); 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 // ignore SIGPIPE
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);
signal(SIGCHLD, SIG_IGN); signal(SIGCHLD, SIG_IGN);

Loading…
Cancel
Save