mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-04 06:36:09 +00:00
revert broken patch FSCORE-652
This commit is contained in:
parent
ef773e0762
commit
5aa13f13e7
23
src/switch.c
23
src/switch.c
@ -271,13 +271,12 @@ int main(int argc, char *argv[])
|
|||||||
switch_size_t pid_len, old_pid_len;
|
switch_size_t pid_len, old_pid_len;
|
||||||
const char *err = NULL; /* error value for return from freeswitch initialization */
|
const char *err = NULL; /* error value for return from freeswitch initialization */
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
int bf = 0;
|
int nf = 0; /* TRUE if we are running in nofork mode */
|
||||||
char *runas_user = NULL;
|
char *runas_user = NULL;
|
||||||
char *runas_group = NULL;
|
char *runas_group = NULL;
|
||||||
#else
|
#else
|
||||||
int win32_service = 0;
|
int win32_service = 0;
|
||||||
#endif
|
#endif
|
||||||
int nf = 0; /* TRUE if we are running in nofork mode */
|
|
||||||
int nc = 0; /* TRUE if we are running in noconsole mode */
|
int nc = 0; /* TRUE if we are running in noconsole mode */
|
||||||
pid_t pid = 0;
|
pid_t pid = 0;
|
||||||
int i, x;
|
int i, x;
|
||||||
@ -329,7 +328,6 @@ int main(int argc, char *argv[])
|
|||||||
"\t-monotonic-clock -- use monotonic clock as timer source\n"
|
"\t-monotonic-clock -- use monotonic clock as timer source\n"
|
||||||
#else
|
#else
|
||||||
"\t-nf -- no forking\n"
|
"\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"
|
"\t-u [user] -- specify user to switch to\n" "\t-g [group] -- specify group to switch to\n"
|
||||||
#endif
|
#endif
|
||||||
"\t-help -- this message\n" "\t-version -- print the version and exit\n"
|
"\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++;
|
known_opt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_argv[x] && !strcmp(local_argv[x], "-bf")) {
|
|
||||||
bf++;
|
|
||||||
known_opt++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (local_argv[x] && !strcmp(local_argv[x], "-version")) {
|
if (local_argv[x] && !strcmp(local_argv[x], "-version")) {
|
||||||
fprintf(stdout, "FreeSWITCH version: %s\n", SWITCH_VERSION_FULL);
|
fprintf(stdout, "FreeSWITCH version: %s\n", SWITCH_VERSION_FULL);
|
||||||
return 0;
|
return 0;
|
||||||
@ -530,14 +523,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (local_argv[x] && !strcmp(local_argv[x], "-nc")) {
|
if (local_argv[x] && !strcmp(local_argv[x], "-nc")) {
|
||||||
if (!nf) {
|
|
||||||
nc++;
|
nc++;
|
||||||
known_opt++;
|
known_opt++;
|
||||||
} else {
|
|
||||||
/* The flags -nc and -nf are mutually exclusive. Ignoring -nc. */
|
|
||||||
nc = 0;
|
|
||||||
known_opt++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_argv[x] && !strcmp(local_argv[x], "-c")) {
|
if (local_argv[x] && !strcmp(local_argv[x], "-c")) {
|
||||||
@ -698,7 +685,7 @@ int main(int argc, char *argv[])
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
FreeConsole();
|
FreeConsole();
|
||||||
#else
|
#else
|
||||||
if (!nf && !bf) {
|
if (!nf) {
|
||||||
daemonize();
|
daemonize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -813,12 +800,6 @@ int main(int argc, char *argv[])
|
|||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
if(bf) {
|
|
||||||
daemonize();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch_core_runtime_loop(nc);
|
switch_core_runtime_loop(nc);
|
||||||
|
|
||||||
destroy_status = switch_core_destroy();
|
destroy_status = switch_core_destroy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user