Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
30f0ad63
提交
30f0ad63
authored
7月 12, 2019
作者:
Andrey Volk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for mod_dptools
上级
ebac830f
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
30 行增加
和
38 行删除
+30
-38
mod_dptools.c
src/mod/applications/mod_dptools/mod_dptools.c
+30
-38
没有找到文件。
src/mod/applications/mod_dptools/mod_dptools.c
浏览文件 @
30f0ad63
...
...
@@ -198,7 +198,7 @@ static switch_status_t digit_action_callback(switch_ivr_dmachine_match_t *match)
}
else
if
(
*
string
==
'['
)
{
flags
=
string
;
if
((
e
=
switch_find_end_paren
(
flags
,
'['
,
']'
)))
{
if
(
e
&&
*++
e
==
':'
)
{
if
(
*++
e
==
':'
)
{
flags
++
;
*
e
++
=
'\0'
;
string
=
e
;
...
...
@@ -393,7 +393,7 @@ static void bind_to_session(switch_core_session_t *session,
if
(
*
string
==
'['
)
{
flags
=
string
;
if
((
e
=
switch_find_end_paren
(
flags
,
'['
,
']'
)))
{
if
(
e
&&
*
(
e
+
1
)
==
':'
)
{
if
(
*
(
e
+
1
)
==
':'
)
{
flags
++
;
*
e
=
'\0'
;
if
(
strchr
(
flags
,
'P'
))
...
...
@@ -3045,7 +3045,7 @@ SWITCH_STANDARD_APP(playback_function)
if
((
p
=
strchr
(
file
,
'@'
))
&&
*
(
p
+
1
)
==
'@'
)
{
*
p
=
'\0'
;
p
+=
2
;
if
(
p
&&
*
p
)
{
if
(
*
p
)
{
fh
.
samples
=
atoi
(
p
);
}
}
...
...
@@ -3260,10 +3260,9 @@ SWITCH_STANDARD_APP(record_function)
if
(
*
l
==
'+'
)
{
l
++
;
}
if
(
l
)
{
limit
=
switch_atoui
(
l
);
}
}
if
(
argv
[
2
])
{
fh
.
thresh
=
switch_atoui
(
argv
[
2
]);
...
...
@@ -3566,8 +3565,6 @@ SWITCH_STANDARD_APP(audio_bridge_function)
fail
=
1
;
}
if
(
camping
)
{
if
(
!
thread_started
&&
fail
&&
moh
&&
!
switch_channel_test_flag
(
caller_channel
,
CF_PROXY_MODE
)
&&
!
switch_channel_test_flag
(
caller_channel
,
CF_PROXY_MEDIA
)
&&
!
switch_true
(
switch_channel_get_variable
(
caller_channel
,
"bypass_media"
)))
{
...
...
@@ -3581,21 +3578,18 @@ SWITCH_STANDARD_APP(audio_bridge_function)
}
if
(
camp_loops
++
)
{
int64_t
wait
=
(
int64_t
)
campon_sleep
*
1000000
;
if
(
--
campon_retries
<=
0
||
stake
.
do_xfer
)
{
stake
.
do_xfer
=
1
;
break
;
}
if
(
fail
)
{
int64_t
wait
=
(
int64_t
)
campon_sleep
*
1000000
;
while
(
stake
.
running
&&
wait
>
0
&&
switch_channel_ready
(
caller_channel
))
{
switch_yield
(
100000
);
wait
-=
100000
;
}
}
}
}
status
=
switch_ivr_originate
(
NULL
,
&
peer_session
,
&
cause
,
camp_data
,
campon_timeout
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
SOF_NONE
,
...
...
@@ -3727,6 +3721,7 @@ static void pickup_send_presence(const char *key_name)
dup_key_name
=
strdup
(
key_name
);
switch_assert
(
dup_key_name
);
key_name
=
dup_key_name
;
if
((
domain_name
=
strchr
(
dup_key_name
,
'@'
)))
{
...
...
@@ -3874,6 +3869,7 @@ static void pickup_add_session(switch_core_session_t *session, const char *key)
}
node
=
malloc
(
sizeof
(
*
node
));
switch_assert
(
node
);
node
->
key
=
strdup
(
key
);
node
->
uuid
=
strdup
(
switch_core_session_get_uuid
(
session
));
node
->
next
=
NULL
;
...
...
@@ -4095,10 +4091,6 @@ static switch_call_cause_t pickup_outgoing_channel(switch_core_session_t *sessio
error:
if
(
nsession
)
{
switch_core_session_destroy
(
&
nsession
);
}
if
(
pool
)
{
*
pool
=
NULL
;
}
...
...
@@ -5415,7 +5407,7 @@ static void cancel(switch_core_session_t *session, master_mutex_t *master)
switch_mutex_lock
(
globals
.
mutex_mutex
);
for
(
np
=
master
->
list
;
np
;
np
=
np
->
next
)
{
if
(
np
&&
!
strcmp
(
np
->
uuid
,
uuid
))
{
if
(
!
strcmp
(
np
->
uuid
,
uuid
))
{
switch_core_event_hook_remove_state_change
(
session
,
mutex_hanguphook
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"%s %s mutex %s canceled
\n
"
,
switch_core_session_get_uuid
(
session
),
...
...
@@ -5552,7 +5544,7 @@ static switch_bool_t do_mutex(switch_core_session_t *session, const char *key, s
switch_mutex_lock
(
globals
.
mutex_mutex
);
used
=
switch_channel_test_app_flag_key
(
key
,
channel
,
MUTEX_FLAG_WAIT
)
||
switch_channel_test_app_flag_key
(
key
,
channel
,
MUTEX_FLAG_SET
);
if
(
(
on
&&
used
)
||
(
!
on
&&
!
used
)
)
{
if
(
!
on
==
!
used
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"INVALID STATE
\n
"
);
switch_mutex_unlock
(
globals
.
mutex_mutex
);
return
SWITCH_FALSE
;
...
...
@@ -5983,7 +5975,7 @@ SWITCH_STANDARD_APP(page_function)
if
(
*
l
==
'+'
)
{
l
++
;
}
if
(
l
)
{
if
(
!
zstr
(
l
)
)
{
limit
=
switch_atoui
(
l
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论