mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 04:31:50 +00:00
Merge branch 'smgmaster' into releases.3.4.experimental_head
Conflicts: libs/freetdm/mod_freetdm/mod_freetdm.c libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c src/mod/endpoints/mod_sofia/mod_sofia.c src/mod/endpoints/mod_sofia/sofia_glue.c
This commit is contained in:
+31
-10
@@ -76,7 +76,7 @@ static HANDLE shutdown_event;
|
||||
static void handle_SIGILL(int sig)
|
||||
{
|
||||
int32_t arg = 0;
|
||||
if (sig);
|
||||
if (sig) {};
|
||||
/* send shutdown signal to the freeswitch core */
|
||||
switch_core_session_ctl(SCSC_SHUTDOWN, &arg);
|
||||
return;
|
||||
@@ -102,6 +102,7 @@ static void handle_SIGCHLD(int sig)
|
||||
pid = wait(&status);
|
||||
|
||||
if (pid > 0) {
|
||||
printf("ASS %d\n", pid);
|
||||
system_ready = -1;
|
||||
}
|
||||
|
||||
@@ -357,7 +358,7 @@ int main(int argc, char *argv[])
|
||||
char *usageDesc;
|
||||
int alt_dirs = 0, log_set = 0, run_set = 0, do_kill = 0;
|
||||
int known_opt;
|
||||
int high_prio = 0;
|
||||
int priority = 0;
|
||||
#ifndef WIN32
|
||||
int do_wait = 0;
|
||||
#endif
|
||||
@@ -407,7 +408,9 @@ int main(int argc, char *argv[])
|
||||
"\t-waste -- allow memory waste\n"
|
||||
"\t-core -- dump cores\n"
|
||||
#endif
|
||||
"\t-hp -- enable high priority settings\n"
|
||||
"\t-rp -- enable high(realtime) priority settings\n"
|
||||
"\t-lp -- enable low priority settings\n"
|
||||
"\t-np -- enable normal priority settings (system defaults)\n"
|
||||
"\t-vg -- run under valgrind\n"
|
||||
"\t-nosql -- disable internal sql scoreboard\n"
|
||||
"\t-heavy-timer -- Heavy Timer, possibly more accurate but at a cost\n"
|
||||
@@ -567,8 +570,18 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
if (local_argv[x] && !strcmp(local_argv[x], "-hp")) {
|
||||
high_prio++;
|
||||
if (local_argv[x] && (!strcmp(local_argv[x], "-hp") || !strcmp(local_argv[x], "-rp"))) {
|
||||
priority = 2;
|
||||
known_opt++;
|
||||
}
|
||||
|
||||
if (local_argv[x] && !strcmp(local_argv[x], "-lp")) {
|
||||
priority = -1;
|
||||
known_opt++;
|
||||
}
|
||||
|
||||
if (local_argv[x] && !strcmp(local_argv[x], "-np")) {
|
||||
priority = 1;
|
||||
known_opt++;
|
||||
}
|
||||
|
||||
@@ -844,13 +857,21 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (high_prio) {
|
||||
set_high_priority();
|
||||
} else {
|
||||
switch(priority) {
|
||||
case 2:
|
||||
set_realtime_priority();
|
||||
break;
|
||||
case 1:
|
||||
set_normal_priority();
|
||||
break;
|
||||
case -1:
|
||||
set_low_priority();
|
||||
break;
|
||||
default:
|
||||
set_auto_priority();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
switch_core_setrlimits();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user