From 5aa13f13e79697a5947a9181139ec12b8bdf0332 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 21 Sep 2010 10:37:04 -0500 Subject: [PATCH] revert broken patch FSCORE-652 --- src/switch.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/src/switch.c b/src/switch.c index b59097ac89..a28baba6f0 100644 --- a/src/switch.c +++ b/src/switch.c @@ -271,13 +271,12 @@ int main(int argc, char *argv[]) switch_size_t pid_len, old_pid_len; const char *err = NULL; /* error value for return from freeswitch initialization */ #ifndef WIN32 - int bf = 0; + int nf = 0; /* TRUE if we are running in nofork mode */ char *runas_user = NULL; char *runas_group = NULL; #else int win32_service = 0; #endif - int nf = 0; /* TRUE if we are running in nofork mode */ int nc = 0; /* TRUE if we are running in noconsole mode */ pid_t pid = 0; int i, x; @@ -329,7 +328,6 @@ int main(int argc, char *argv[]) "\t-monotonic-clock -- use monotonic clock as timer source\n" #else "\t-nf -- no forking\n" - "\t-bf -- block until fully started, then fork\n" "\t-u [user] -- specify user to switch to\n" "\t-g [group] -- specify group to switch to\n" #endif "\t-help -- this message\n" "\t-version -- print the version and exit\n" @@ -463,11 +461,6 @@ int main(int argc, char *argv[]) known_opt++; } - if (local_argv[x] && !strcmp(local_argv[x], "-bf")) { - bf++; - known_opt++; - } - if (local_argv[x] && !strcmp(local_argv[x], "-version")) { fprintf(stdout, "FreeSWITCH version: %s\n", SWITCH_VERSION_FULL); return 0; @@ -530,14 +523,8 @@ int main(int argc, char *argv[]) } if (local_argv[x] && !strcmp(local_argv[x], "-nc")) { - if (!nf) { - nc++; - known_opt++; - } else { - /* The flags -nc and -nf are mutually exclusive. Ignoring -nc. */ - nc = 0; - known_opt++; - } + nc++; + known_opt++; } if (local_argv[x] && !strcmp(local_argv[x], "-c")) { @@ -698,7 +685,7 @@ int main(int argc, char *argv[]) #ifdef WIN32 FreeConsole(); #else - if (!nf && !bf) { + if (!nf) { daemonize(); } #endif @@ -813,12 +800,6 @@ int main(int argc, char *argv[]) return 255; } -#ifndef WIN32 - if(bf) { - daemonize(); - } -#endif - switch_core_runtime_loop(nc); destroy_status = switch_core_destroy();