Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
6d056e16
提交
6d056e16
authored
2月 14, 2017
作者:
Razvan Crainea
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-10038: [core] tune heartbeat events interval
上级
9e971e56
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
15 行增加
和
1 行删除
+15
-1
switch.conf.xml
conf/vanilla/autoload_configs/switch.conf.xml
+3
-0
switch_core_pvt.h
src/include/private/switch_core_pvt.h
+1
-0
switch_core.c
src/switch_core.c
+11
-1
没有找到文件。
conf/vanilla/autoload_configs/switch.conf.xml
浏览文件 @
6d056e16
...
...
@@ -48,6 +48,9 @@
<!-- Minimum idle CPU before refusing calls -->
<!-- <param name="min-idle-cpu" value="25"/> -->
<!-- Interval between heartbeat events -->
<!-- <param name="event-heartbeat-interval" value="20"/> -->
<!--
Max number of sessions to allow at any given time.
...
...
src/include/private/switch_core_pvt.h
浏览文件 @
6d056e16
...
...
@@ -302,6 +302,7 @@ struct switch_runtime {
int
multiple_registrations
;
uint32_t
max_db_handles
;
uint32_t
db_handle_timeout
;
uint32_t
event_heartbeat_interval
;
int
cpu_count
;
uint32_t
time_sync
;
char
*
core_db_pre_trans_execute
;
...
...
src/switch_core.c
浏览文件 @
6d056e16
...
...
@@ -206,7 +206,7 @@ SWITCH_STANDARD_SCHED_FUNC(heartbeat_callback)
send_heartbeat
();
/* reschedule this task */
task
->
runtime
=
switch_epoch_time_now
(
NULL
)
+
20
;
task
->
runtime
=
switch_epoch_time_now
(
NULL
)
+
runtime
.
event_heartbeat_interval
;
}
...
...
@@ -1826,6 +1826,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
runtime
.
max_db_handles
=
50
;
runtime
.
db_handle_timeout
=
5000000
;
runtime
.
event_heartbeat_interval
=
20
;
runtime
.
runlevel
++
;
runtime
.
dummy_cng_frame
.
data
=
runtime
.
dummy_data
;
...
...
@@ -2140,6 +2141,15 @@ static void switch_load_core_config(const char *file)
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"db-handle-timeout must be between 1 and 5000
\n
"
);
}
}
else
if
(
!
strcasecmp
(
var
,
"event-heartbeat-interval"
))
{
long
tmp
=
atol
(
val
);
if
(
tmp
>
0
)
{
runtime
.
event_heartbeat_interval
=
(
uint32_t
)
tmp
;
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"heartbeat-interval must be a greater than 0
\n
"
);
}
}
else
if
(
!
strcasecmp
(
var
,
"multiple-registrations"
))
{
runtime
.
multiple_registrations
=
switch_true
(
val
);
}
else
if
(
!
strcasecmp
(
var
,
"auto-create-schemas"
))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论