Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
1f34c930
提交
1f34c930
authored
2月 16, 2012
作者:
Moises Silva
提交者:
James Zhang
2月 16, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: Remove optimistic sanity check, prints spurious error messages
上级
4ccc26f0
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
1 行删除
+11
-1
ftdm_state.c
libs/freetdm/src/ftdm_state.c
+11
-1
没有找到文件。
libs/freetdm/src/ftdm_state.c
浏览文件 @
1f34c930
...
...
@@ -48,12 +48,22 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_complete_state(const char *file, const c
ftdm_time_t
diff
=
0
;
ftdm_channel_state_t
state
=
fchan
->
state
;
#if 0
/* I could not perform this sanity check without more disruptive changes. Ideally we should check here if the signaling module completing the state
executed a state processor (called ftdm_channel_advance_states() which call fchan->span->state_processor(fchan)) for the state. That is just a
sanity check, as in the past we had at least one bug where the signaling module set the state and then accidentally changed the state to a new one
without calling ftdm_channel_advance_states(), meaning the state processor for the first state was not executed and that lead to unexpected behavior.
If we want to be able to perform this kind of sanity check it would be nice to add a new state status (FTDM_STATE_STATUS_PROCESSING), the function
ftdm_channel_advance_states() would set the state_status to PROCESSING and then the check below for STATUS_NEW would be valid. Currently is not
valid because the signaling module may be completing the state at the end of the state_processor callback and therefore the state will still be
in STATUS_NEW, and is perfectly valid ... */
if (fchan->state_status == FTDM_STATE_STATUS_NEW) {
ftdm_log_chan_ex(fchan, file, func, line, FTDM_LOG_LEVEL_CRIT,
"Asking to complete state change from %s to %s in %llums, but the state is still unprocessed (this might be a bug!)\n",
ftdm_channel_state2str(fchan->last_state), ftdm_channel_state2str(state), diff);
/* We should probably return here with FTDM_FAIL if we don't see this message in production environments for a while (2012-02-16) */
}
#endif
if
(
fchan
->
state_status
==
FTDM_STATE_STATUS_COMPLETED
)
{
ftdm_assert_return
(
!
ftdm_test_flag
(
fchan
,
FTDM_CHANNEL_STATE_CHANGE
),
FTDM_FAIL
,
"State change flag set but state is already completed
\n
"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论