FS-4186 --resolve

This commit is contained in:
Anthony Minessale
2012-05-04 08:25:48 -05:00
parent fd9486f0ed
commit 5190bd0849
3 changed files with 10 additions and 4 deletions

View File

@@ -744,6 +744,8 @@ SWITCH_DECLARE(int32_t) set_auto_priority(void)
runtime.cpu_count = sysinfo.dwNumberOfProcessors;
#endif
if (!runtime.cpu_count) runtime.cpu_count = 1;
/* If we have more than 1 cpu, we should use realtime priority so we can have priority threads */
if (runtime.cpu_count > 1) {
return set_realtime_priority();
@@ -1421,6 +1423,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
}
#endif
if (!runtime.cpu_count) runtime.cpu_count = 1;
/* INIT APR and Create the pool context */
if (apr_initialize() != SWITCH_STATUS_SUCCESS) {
*err = "FATAL ERROR! Could not initialize APR\n";