mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add nitrus boost to sql thread
This commit is contained in:
@@ -1222,7 +1222,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);
|
||||
@@ -1440,6 +1441,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);
|
||||
|
Reference in New Issue
Block a user