few new command line opts -vm for conditonal timer, -nocal to skip timer calibration and -nort to turn off clock_realtime fam of functions

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16324 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2010-01-15 21:09:51 +00:00
parent 2731b1e580
commit da29b01195
3 changed files with 45 additions and 8 deletions

View File

@@ -171,7 +171,7 @@ void WINAPI ServiceCtrlHandler(DWORD control)
/* the main service entry point */
void WINAPI service_main(DWORD numArgs, char **args)
{
switch_core_flag_t flags = SCF_USE_SQL | SCF_USE_AUTO_NAT;
switch_core_flag_t flags = SCF_USE_SQL | SCF_USE_AUTO_NAT | SCF_CALIBRATE_CLOCK | SCF_USE_CLOCK_RT;
const char *err = NULL; /* error value for return from freeswitch initialization */
/* we have to initialize the service-specific stuff */
memset(&status, 0, sizeof(SERVICE_STATUS));
@@ -282,7 +282,7 @@ int main(int argc, char *argv[])
#ifdef __sun
switch_core_flag_t flags = SCF_USE_SQL;
#else
switch_core_flag_t flags = SCF_USE_SQL | SCF_USE_AUTO_NAT;
switch_core_flag_t flags = SCF_USE_SQL | SCF_USE_AUTO_NAT | SCF_CALIBRATE_CLOCK | SCF_USE_CLOCK_RT;
#endif
int ret = 0;
switch_status_t destroy_status;
@@ -328,7 +328,10 @@ int main(int argc, char *argv[])
"\t-hp -- enable high priority settings\n"
"\t-vg -- run under valgrind\n"
"\t-nosql -- disable internal sql scoreboard\n"
"\t-vm -- use possibly more vm-friendly timing code.\n"
"\t-nonat -- disable auto nat detection\n"
"\t-nocal -- disable clock calibration\n"
"\t-nort -- disable clock clock_realtime\n"
"\t-stop -- stop freeswitch\n"
"\t-nc -- do not output to a console and background\n"
"\t-c -- output to a console and stay in the foreground\n"
@@ -492,6 +495,21 @@ int main(int argc, char *argv[])
known_opt++;
}
if (local_argv[x] && !strcmp(local_argv[x], "-vm")) {
flags |= SCF_USE_COND_TIMING;
known_opt++;
}
if (local_argv[x] && !strcmp(local_argv[x], "-nort")) {
flags &= ~SCF_USE_CLOCK_RT;
known_opt++;
}
if (local_argv[x] && !strcmp(local_argv[x], "-nocal")) {
flags &= ~SCF_CALIBRATE_CLOCK;
known_opt++;
}
if (local_argv[x] && !strcmp(local_argv[x], "-vg")) {
flags |= SCF_VG;
known_opt++;