Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c952a025
提交
c952a025
authored
7月 12, 2019
作者:
Andrey Volk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for mod_spandsp
上级
2bf545a1
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
18 行增加
和
13 行删除
+18
-13
mod_spandsp.c
src/mod/applications/mod_spandsp/mod_spandsp.c
+5
-1
mod_spandsp_codecs.c
src/mod/applications/mod_spandsp/mod_spandsp_codecs.c
+1
-1
mod_spandsp_fax.c
src/mod/applications/mod_spandsp/mod_spandsp_fax.c
+11
-8
mod_spandsp_modem.c
src/mod/applications/mod_spandsp/mod_spandsp_modem.c
+0
-2
udptl.c
src/mod/applications/mod_spandsp/udptl.c
+1
-1
没有找到文件。
src/mod/applications/mod_spandsp/mod_spandsp.c
浏览文件 @
c952a025
...
@@ -282,6 +282,8 @@ SWITCH_STANDARD_API(start_tone_detect_api)
...
@@ -282,6 +282,8 @@ SWITCH_STANDARD_API(start_tone_detect_api)
puuid
=
strdup
((
char
*
)
cmd
);
puuid
=
strdup
((
char
*
)
cmd
);
switch_assert
(
puuid
);
if
((
descriptor
=
strchr
(
puuid
,
' '
)))
{
if
((
descriptor
=
strchr
(
puuid
,
' '
)))
{
*
descriptor
++
=
'\0'
;
*
descriptor
++
=
'\0'
;
}
}
...
@@ -367,7 +369,7 @@ SWITCH_STANDARD_API(start_tdd_detect_api)
...
@@ -367,7 +369,7 @@ SWITCH_STANDARD_API(start_tdd_detect_api)
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
spandsp_tdd_decode_session
(
psession
);
s
tatus
=
s
pandsp_tdd_decode_session
(
psession
);
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
stream
->
write_function
(
stream
,
"+OK started
\n
"
);
stream
->
write_function
(
stream
,
"+OK started
\n
"
);
...
@@ -413,6 +415,8 @@ SWITCH_STANDARD_API(start_send_tdd_api)
...
@@ -413,6 +415,8 @@ SWITCH_STANDARD_API(start_send_tdd_api)
puuid
=
strdup
((
char
*
)
cmd
);
puuid
=
strdup
((
char
*
)
cmd
);
switch_assert
(
puuid
);
if
((
text
=
strchr
(
puuid
,
' '
)))
{
if
((
text
=
strchr
(
puuid
,
' '
)))
{
*
text
++
=
'\0'
;
*
text
++
=
'\0'
;
}
}
...
...
src/mod/applications/mod_spandsp/mod_spandsp_codecs.c
浏览文件 @
c952a025
...
@@ -463,7 +463,7 @@ static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag
...
@@ -463,7 +463,7 @@ static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
}
if
(
(
flags
&
SWITCH_CODEC_FLAG_AAL2
||
strstr
(
codec
->
implementation
->
iananame
,
"AAL2"
)
))
{
if
(
flags
&
SWITCH_CODEC_FLAG_AAL2
||
strstr
(
codec
->
implementation
->
iananame
,
"AAL2"
))
{
packing
=
G726_PACKING_LEFT
;
packing
=
G726_PACKING_LEFT
;
}
}
...
...
src/mod/applications/mod_spandsp/mod_spandsp_fax.c
浏览文件 @
c952a025
...
@@ -824,9 +824,7 @@ static switch_status_t spanfax_init(pvt_t *pvt, transport_mode_t trans_mode)
...
@@ -824,9 +824,7 @@ static switch_status_t spanfax_init(pvt_t *pvt, transport_mode_t trans_mode)
/* add to timer thread processing */
/* add to timer thread processing */
if
(
!
add_pvt
(
pvt
))
{
if
(
!
add_pvt
(
pvt
))
{
if
(
channel
)
{
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
}
}
}
span_log_set_message_handler
(
t38_terminal_get_logging_state
(
t38
),
mod_spandsp_log_message
,
pvt
->
session
);
span_log_set_message_handler
(
t38_terminal_get_logging_state
(
t38
),
mod_spandsp_log_message
,
pvt
->
session
);
...
@@ -1027,12 +1025,17 @@ static switch_status_t spanfax_destroy(pvt_t *pvt)
...
@@ -1027,12 +1025,17 @@ static switch_status_t spanfax_destroy(pvt_t *pvt)
static
t38_mode_t
configure_t38
(
pvt_t
*
pvt
)
static
t38_mode_t
configure_t38
(
pvt_t
*
pvt
)
{
{
switch_core_session_t
*
session
=
pvt
->
session
;
switch_core_session_t
*
session
;
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
)
;
switch_channel_t
*
channel
;
switch_t38_options_t
*
t38_options
=
switch_channel_get_private
(
channel
,
"t38_options"
)
;
switch_t38_options_t
*
t38_options
;
int
method
=
2
;
int
method
=
2
;
if
(
!
t38_options
||
!
pvt
||
!
pvt
->
t38_core
)
{
switch_assert
(
pvt
&&
pvt
->
session
);
session
=
pvt
->
session
;
channel
=
switch_core_session_get_channel
(
session
);
t38_options
=
switch_channel_get_private
(
channel
,
"t38_options"
);
if
(
!
t38_options
||
!
pvt
->
t38_core
)
{
pvt
->
t38_mode
=
T38_MODE_REFUSED
;
pvt
->
t38_mode
=
T38_MODE_REFUSED
;
return
pvt
->
t38_mode
;
return
pvt
->
t38_mode
;
}
}
...
@@ -2364,7 +2367,7 @@ switch_status_t spandsp_fax_detect_session(switch_core_session_t *session,
...
@@ -2364,7 +2367,7 @@ switch_status_t spandsp_fax_detect_session(switch_core_session_t *session,
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
}
if
(
!
cont
&&
!
(
cont
=
switch_core_session_alloc
(
session
,
sizeof
(
*
cont
))))
{
if
(
!
(
cont
=
switch_core_session_alloc
(
session
,
sizeof
(
*
cont
))))
{
return
SWITCH_STATUS_MEMERR
;
return
SWITCH_STATUS_MEMERR
;
}
}
...
...
src/mod/applications/mod_spandsp/mod_spandsp_modem.c
浏览文件 @
c952a025
...
@@ -744,8 +744,6 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
...
@@ -744,8 +744,6 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
case
SWITCH_MESSAGE_INDICATE_RINGING
:
case
SWITCH_MESSAGE_INDICATE_RINGING
:
break
;
break
;
case
SWITCH_MESSAGE_INDICATE_BRIDGE
:
case
SWITCH_MESSAGE_INDICATE_BRIDGE
:
mod_spandsp_indicate_data
(
session
,
SWITCH_FALSE
,
SWITCH_TRUE
);
break
;
case
SWITCH_MESSAGE_INDICATE_UNBRIDGE
:
case
SWITCH_MESSAGE_INDICATE_UNBRIDGE
:
mod_spandsp_indicate_data
(
session
,
SWITCH_FALSE
,
SWITCH_TRUE
);
mod_spandsp_indicate_data
(
session
,
SWITCH_FALSE
,
SWITCH_TRUE
);
break
;
break
;
...
...
src/mod/applications/mod_spandsp/udptl.c
浏览文件 @
c952a025
...
@@ -363,7 +363,7 @@ int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
...
@@ -363,7 +363,7 @@ int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
int
udptl_build_packet
(
udptl_state_t
*
s
,
uint8_t
buf
[],
const
uint8_t
msg
[],
int
msg_len
)
int
udptl_build_packet
(
udptl_state_t
*
s
,
uint8_t
buf
[],
const
uint8_t
msg
[],
int
msg_len
)
{
{
uint8_t
fec
[
LOCAL_FAX_MAX_DATAGRAM
];
uint8_t
fec
[
LOCAL_FAX_MAX_DATAGRAM
]
=
{
0
}
;
int
i
;
int
i
;
int
j
;
int
j
;
int
seq
;
int
seq
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论