Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9f926248
提交
9f926248
authored
4月 07, 2014
作者:
Chris Rienzo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mod_rayo: fix memory corruption in dial, input, output
上级
84123800
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
9 行增加
和
9 行删除
+9
-9
mod_rayo.c
src/mod/event_handlers/mod_rayo/mod_rayo.c
+5
-5
rayo_input_component.c
src/mod/event_handlers/mod_rayo/rayo_input_component.c
+2
-2
rayo_output_component.c
src/mod/event_handlers/mod_rayo/rayo_output_component.c
+1
-1
rayo_record_component.c
src/mod/event_handlers/mod_rayo/rayo_record_component.c
+1
-1
没有找到文件。
src/mod/event_handlers/mod_rayo/mod_rayo.c
浏览文件 @
9f926248
...
@@ -2462,7 +2462,7 @@ static void *SWITCH_THREAD_FUNC rayo_dial_thread(switch_thread_t *thread, void *
...
@@ -2462,7 +2462,7 @@ static void *SWITCH_THREAD_FUNC rayo_dial_thread(switch_thread_t *thread, void *
goto
done
;
goto
done
;
}
}
call
->
dcp_jid
=
switch_core_strdup
(
RAYO_POOL
(
call
),
dcp_jid
);
call
->
dcp_jid
=
switch_core_strdup
(
RAYO_POOL
(
call
),
dcp_jid
);
call
->
dial_request_id
=
iks_find_attrib
(
iq
,
"id"
);
call
->
dial_request_id
=
switch_core_strdup
(
RAYO_POOL
(
call
),
iks_find_attrib_soft
(
iq
,
"id"
)
);
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
rayo_call_get_uuid
(
call
)),
SWITCH_LOG_INFO
,
"%s has control of call
\n
"
,
dcp_jid
);
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
rayo_call_get_uuid
(
call
)),
SWITCH_LOG_INFO
,
"%s has control of call
\n
"
,
dcp_jid
);
uuid
=
switch_core_strdup
(
dtdata
->
pool
,
rayo_call_get_uuid
(
call
));
uuid
=
switch_core_strdup
(
dtdata
->
pool
,
rayo_call_get_uuid
(
call
));
...
@@ -2571,7 +2571,7 @@ static void *SWITCH_THREAD_FUNC rayo_dial_thread(switch_thread_t *thread, void *
...
@@ -2571,7 +2571,7 @@ static void *SWITCH_THREAD_FUNC rayo_dial_thread(switch_thread_t *thread, void *
if
(
strncmp
(
"+OK"
,
api_stream
.
data
,
strlen
(
"+OK"
)))
{
if
(
strncmp
(
"+OK"
,
api_stream
.
data
,
strlen
(
"+OK"
)))
{
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
uuid
),
SWITCH_LOG_INFO
,
"Failed to originate call
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
uuid
),
SWITCH_LOG_INFO
,
"Failed to originate call
\n
"
);
if
(
call
->
dial_request_id
)
{
if
(
!
zstr
(
call
->
dial_request_id
)
)
{
call
->
dial_request_failed
=
1
;
call
->
dial_request_failed
=
1
;
call
->
dial_request_id
=
NULL
;
call
->
dial_request_id
=
NULL
;
...
@@ -2608,7 +2608,7 @@ static void *SWITCH_THREAD_FUNC rayo_dial_thread(switch_thread_t *thread, void *
...
@@ -2608,7 +2608,7 @@ static void *SWITCH_THREAD_FUNC rayo_dial_thread(switch_thread_t *thread, void *
switch_mutex_unlock
(
RAYO_ACTOR
(
call
)
->
mutex
);
switch_mutex_unlock
(
RAYO_ACTOR
(
call
)
->
mutex
);
}
else
{
}
else
{
switch_mutex_lock
(
RAYO_ACTOR
(
call
)
->
mutex
);
switch_mutex_lock
(
RAYO_ACTOR
(
call
)
->
mutex
);
if
(
call
->
dial_request_id
)
{
if
(
!
zstr
(
call
->
dial_request_id
)
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Failed to exec originate API
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Failed to exec originate API
\n
"
);
call
->
dial_request_failed
=
1
;
call
->
dial_request_failed
=
1
;
call
->
dial_request_id
=
NULL
;
call
->
dial_request_id
=
NULL
;
...
@@ -3140,7 +3140,7 @@ static void on_call_originate_event(struct rayo_client *rclient, switch_event_t
...
@@ -3140,7 +3140,7 @@ static void on_call_originate_event(struct rayo_client *rclient, switch_event_t
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
RAYO_ID
(
call
)),
SWITCH_LOG_DEBUG
,
"Got originate event
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
RAYO_ID
(
call
)),
SWITCH_LOG_DEBUG
,
"Got originate event
\n
"
);
switch_mutex_lock
(
RAYO_ACTOR
(
call
)
->
mutex
);
switch_mutex_lock
(
RAYO_ACTOR
(
call
)
->
mutex
);
if
(
call
->
dial_request_id
)
{
if
(
!
zstr
(
call
->
dial_request_id
)
)
{
/* send response to DCP */
/* send response to DCP */
response
=
iks_new
(
"iq"
);
response
=
iks_new
(
"iq"
);
iks_insert_attrib
(
response
,
"from"
,
RAYO_JID
(
globals
.
server
));
iks_insert_attrib
(
response
,
"from"
,
RAYO_JID
(
globals
.
server
));
...
@@ -3178,7 +3178,7 @@ static void on_call_end_event(switch_event_t *event)
...
@@ -3178,7 +3178,7 @@ static void on_call_end_event(switch_event_t *event)
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
RAYO_ID
(
call
)),
SWITCH_LOG_DEBUG
,
"Got channel destroy event
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_UUID_LOG
(
RAYO_ID
(
call
)),
SWITCH_LOG_DEBUG
,
"Got channel destroy event
\n
"
);
switch_mutex_lock
(
RAYO_ACTOR
(
call
)
->
mutex
);
switch_mutex_lock
(
RAYO_ACTOR
(
call
)
->
mutex
);
if
(
!
call
->
dial_request_id
&&
!
call
->
dial_request_failed
)
{
if
(
zstr
(
call
->
dial_request_id
)
&&
!
call
->
dial_request_failed
)
{
switch_event_dup
(
&
call
->
end_event
,
event
);
switch_event_dup
(
&
call
->
end_event
,
event
);
RAYO_DESTROY
(
call
);
RAYO_DESTROY
(
call
);
RAYO_UNLOCK
(
call
);
/* decrement ref from creation */
RAYO_UNLOCK
(
call
);
/* decrement ref from creation */
...
...
src/mod/event_handlers/mod_rayo/rayo_input_component.c
浏览文件 @
9f926248
...
@@ -604,8 +604,8 @@ static iks *start_call_input(struct input_component *component, switch_core_sess
...
@@ -604,8 +604,8 @@ static iks *start_call_input(struct input_component *component, switch_core_sess
component
->
barge_event
=
iks_find_bool_attrib
(
input
,
"barge-event"
);
component
->
barge_event
=
iks_find_bool_attrib
(
input
,
"barge-event"
);
component
->
start_timers
=
iks_find_bool_attrib
(
input
,
"start-timers"
);
component
->
start_timers
=
iks_find_bool_attrib
(
input
,
"start-timers"
);
component
->
term_digit
=
iks_find_char_attrib
(
input
,
"terminator"
);
component
->
term_digit
=
iks_find_char_attrib
(
input
,
"terminator"
);
component
->
recognizer
=
iks_find_attrib
(
input
,
"recognizer"
);
component
->
recognizer
=
switch_core_strdup
(
RAYO_POOL
(
input
),
iks_find_attrib_soft
(
input
,
"recognizer"
)
);
component
->
language
=
iks_find_attrib
(
input
,
"language"
);
component
->
language
=
switch_core_strdup
(
RAYO_POOL
(
input
),
iks_find_attrib_soft
(
input
,
"language"
)
);
component
->
handler
=
handler
;
component
->
handler
=
handler
;
component
->
speech_mode
=
strcmp
(
iks_find_attrib_soft
(
input
,
"mode"
),
"dtmf"
);
component
->
speech_mode
=
strcmp
(
iks_find_attrib_soft
(
input
,
"mode"
),
"dtmf"
);
...
...
src/mod/event_handlers/mod_rayo/rayo_output_component.c
浏览文件 @
9f926248
...
@@ -76,7 +76,7 @@ static struct rayo_component *create_output_component(struct rayo_actor *actor,
...
@@ -76,7 +76,7 @@ static struct rayo_component *create_output_component(struct rayo_actor *actor,
output_component
->
repeat_times
=
iks_find_int_attrib
(
output
,
"repeat-times"
);
output_component
->
repeat_times
=
iks_find_int_attrib
(
output
,
"repeat-times"
);
output_component
->
max_time_ms
=
iks_find_int_attrib
(
output
,
"max-time"
);
output_component
->
max_time_ms
=
iks_find_int_attrib
(
output
,
"max-time"
);
output_component
->
start_paused
=
iks_find_bool_attrib
(
output
,
"start-paused"
);
output_component
->
start_paused
=
iks_find_bool_attrib
(
output
,
"start-paused"
);
output_component
->
renderer
=
iks_find_attrib
(
output
,
"renderer"
);
output_component
->
renderer
=
switch_core_strdup
(
RAYO_POOL
(
actor
),
iks_find_attrib_soft
(
output
,
"renderer"
)
);
}
else
{
}
else
{
switch_core_destroy_memory_pool
(
&
pool
);
switch_core_destroy_memory_pool
(
&
pool
);
}
}
...
...
src/mod/event_handlers/mod_rayo/rayo_record_component.c
浏览文件 @
9f926248
...
@@ -170,7 +170,7 @@ static struct rayo_component *record_component_create(struct rayo_actor *actor,
...
@@ -170,7 +170,7 @@ static struct rayo_component *record_component_create(struct rayo_actor *actor,
switch_core_new_memory_pool
(
&
pool
);
switch_core_new_memory_pool
(
&
pool
);
record_component
=
switch_core_alloc
(
pool
,
sizeof
(
*
record_component
));
record_component
=
switch_core_alloc
(
pool
,
sizeof
(
*
record_component
));
record_component
=
RECORD_COMPONENT
(
rayo_component_init
(
RAYO_COMPONENT
(
record_component
),
pool
,
type
,
"record"
,
fs_file_path
,
actor
,
client_jid
));
\
record_component
=
RECORD_COMPONENT
(
rayo_component_init
(
RAYO_COMPONENT
(
record_component
),
pool
,
type
,
"record"
,
fs_file_path
,
actor
,
client_jid
));
if
(
record_component
)
{
if
(
record_component
)
{
record_component
->
max_duration
=
iks_find_int_attrib
(
record
,
"max-duration"
);
record_component
->
max_duration
=
iks_find_int_attrib
(
record
,
"max-duration"
);
record_component
->
initial_timeout
=
iks_find_int_attrib
(
record
,
"initial-timeout"
);
record_component
->
initial_timeout
=
iks_find_int_attrib
(
record
,
"initial-timeout"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论