Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d2710422
提交
d2710422
authored
10月 06, 2011
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix issue where clearing a single realm does not completely clear
上级
915b96ea
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
3 行删除
+22
-3
switch_ivr.h
src/include/switch_ivr.h
+1
-0
mod_dptools.c
src/mod/applications/mod_dptools/mod_dptools.c
+1
-0
switch_ivr_async.c
src/switch_ivr_async.c
+20
-3
没有找到文件。
src/include/switch_ivr.h
浏览文件 @
d2710422
...
...
@@ -896,6 +896,7 @@ SWITCH_DECLARE(switch_bool_t) switch_ivr_uuid_exists(const char *uuid);
SWITCH_DECLARE
(
const
char
*
)
switch_ivr_dmachine_get_name
(
switch_ivr_dmachine_t
*
dmachine
);
SWITCH_DECLARE
(
void
)
switch_ivr_dmachine_set_match_callback
(
switch_ivr_dmachine_t
*
dmachine
,
switch_ivr_dmachine_callback_t
match_callback
);
SWITCH_DECLARE
(
void
)
switch_ivr_dmachine_set_nonmatch_callback
(
switch_ivr_dmachine_t
*
dmachine
,
switch_ivr_dmachine_callback_t
nonmatch_callback
);
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_dmachine_create
(
switch_ivr_dmachine_t
**
dmachine_p
,
...
...
src/mod/applications/mod_dptools/mod_dptools.c
浏览文件 @
d2710422
...
...
@@ -247,6 +247,7 @@ SWITCH_STANDARD_APP(clear_digit_action_function)
if
((
dmachine
=
switch_core_session_get_dmachine
(
session
,
target
)))
{
if
(
zstr
(
realm
)
||
!
strcasecmp
(
realm
,
"all"
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Digit parser %s: Clearing all realms
\n
"
,
switch_ivr_dmachine_get_name
(
dmachine
));
switch_core_session_set_dmachine
(
session
,
NULL
,
target
);
switch_ivr_dmachine_destroy
(
&
dmachine
);
}
else
{
...
...
src/switch_ivr_async.c
浏览文件 @
d2710422
...
...
@@ -105,6 +105,11 @@ SWITCH_DECLARE(void) switch_ivr_dmachine_set_nonmatch_callback(switch_ivr_dmachi
}
SWITCH_DECLARE
(
const
char
*
)
switch_ivr_dmachine_get_name
(
switch_ivr_dmachine_t
*
dmachine
)
{
return
(
const
char
*
)
dmachine
->
name
;
}
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_dmachine_create
(
switch_ivr_dmachine_t
**
dmachine_p
,
const
char
*
name
,
switch_memory_pool_t
*
pool
,
...
...
@@ -179,23 +184,35 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_set_realm(switch_ivr_dmachin
dm_binding_head_t
*
headp
=
switch_core_hash_find
(
dmachine
->
binding_hash
,
realm
);
if
(
headp
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Digit parser %s: Setting realm to
%s
\n
"
,
dmachine
->
name
,
realm
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Digit parser %s: Setting realm to
'%s'
\n
"
,
dmachine
->
name
,
realm
);
dmachine
->
realm
=
headp
;
return
SWITCH_STATUS_SUCCESS
;
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Digit parser %s: Error Setting realm to
%s
\n
"
,
dmachine
->
name
,
realm
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Digit parser %s: Error Setting realm to
'%s'
\n
"
,
dmachine
->
name
,
realm
);
return
SWITCH_STATUS_FALSE
;
}
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_dmachine_clear_realm
(
switch_ivr_dmachine_t
*
dmachine
,
const
char
*
realm
)
{
dm_binding_head_t
*
headp
;
if
(
zstr
(
realm
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Digit parser %s: Error unknown realm:
%s
\n
"
,
dmachine
->
name
,
realm
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Digit parser %s: Error unknown realm:
'%s'
\n
"
,
dmachine
->
name
,
realm
);
return
SWITCH_STATUS_FALSE
;
}
headp
=
switch_core_hash_find
(
dmachine
->
binding_hash
,
realm
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Digit parser %s: Clearing realm '%s'
\n
"
,
dmachine
->
name
,
realm
);
if
(
headp
==
dmachine
->
realm
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"Digit parser %s: '%s' was the active realm, no realm currently selected.
\n
"
,
dmachine
->
name
,
realm
);
dmachine
->
realm
=
NULL
;
}
/* pool alloc'd just ditch it and it will give back the memory when we destroy ourselves */
switch_core_hash_delete
(
dmachine
->
binding_hash
,
realm
);
return
SWITCH_STATUS_SUCCESS
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论