mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 22:54:18 +00:00
Merge branch 'master' into smgmaster
Conflicts: src/switch_core_sqldb.c
This commit is contained in:
commit
a94590bbc7
57 files changed
+5183
-711
No files matched your search
+37
-2
@@ -1225,7 +1225,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
||||
}
|
||||
|
||||
runtime.runlevel++;
|
||||
|
||||
runtime.sql_buffer_len = 1024 * 32;
|
||||
runtime.max_sql_buffer_len = 1024 * 1024;
|
||||
runtime.dummy_cng_frame.data = runtime.dummy_data;
|
||||
runtime.dummy_cng_frame.datalen = sizeof(runtime.dummy_data);
|
||||
runtime.dummy_cng_frame.buflen = sizeof(runtime.dummy_data);
|
||||
@@ -1321,6 +1322,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
||||
|
||||
switch_log_init(runtime.memory_pool, runtime.colorize_console);
|
||||
|
||||
if (flags & SCF_MINIMAL) return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
runtime.tipping_point = 5000;
|
||||
runtime.timer_affinity = -1;
|
||||
|
||||
@@ -1444,6 +1447,37 @@ static void switch_load_core_config(const char *file)
|
||||
if (tmp > -1 && tmp < 11) {
|
||||
switch_core_session_ctl(SCSC_DEBUG_LEVEL, &tmp);
|
||||
}
|
||||
} else if (!strcasecmp(var, "sql-buffer-len")) {
|
||||
int tmp = atoi(val);
|
||||
|
||||
if (end_of(val) == 'k') {
|
||||
tmp *= 1024;
|
||||
} else if (end_of(val) == 'm') {
|
||||
tmp *= (1024 * 1024);
|
||||
}
|
||||
|
||||
if (tmp >= 32000 && tmp < 10500000) {
|
||||
runtime.sql_buffer_len = tmp;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "sql-buffer-len: Value is not within rage 32k to 10m\n");
|
||||
}
|
||||
} else if (!strcasecmp(var, "max-sql-buffer-len")) {
|
||||
int tmp = atoi(val);
|
||||
|
||||
if (end_of(val) == 'k') {
|
||||
tmp *= 1024;
|
||||
} else if (end_of(val) == 'm') {
|
||||
tmp *= (1024 * 1024);
|
||||
}
|
||||
|
||||
if (tmp < runtime.sql_buffer_len) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Value is not larger than sql-buffer-len\n");
|
||||
} else if (tmp >= 32000 && tmp < 10500000) {
|
||||
runtime.sql_buffer_len = tmp;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "max-sql-buffer-len: Value is not within rage 32k to 10m\n");
|
||||
}
|
||||
|
||||
} else if (!strcasecmp(var, "auto-create-schemas")) {
|
||||
if (switch_true(val)) {
|
||||
switch_set_flag((&runtime), SCF_AUTO_SCHEMAS);
|
||||
@@ -1614,7 +1648,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(switch_core_flag_t
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Bringing up environment.\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Loading Modules.\n");
|
||||
if (switch_loadable_module_init() != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_loadable_module_init(SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
|
||||
*err = "Cannot load modules";
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Error: %s\n", *err);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
@@ -1922,6 +1956,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void)
|
||||
switch_scheduler_task_thread_stop();
|
||||
|
||||
switch_rtp_shutdown();
|
||||
|
||||
if (switch_test_flag((&runtime), SCF_USE_AUTO_NAT)) {
|
||||
switch_nat_shutdown();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user