Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e23aa12a
提交
e23aa12a
authored
12月 10, 2015
作者:
Armen Babikyan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-8643: fix mod_sofia memory leaks
上级
cae25539
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
11 行增加
和
6 行删除
+11
-6
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+6
-1
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+2
-3
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+3
-2
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
e23aa12a
...
...
@@ -2638,6 +2638,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
stream
->
write_function
(
stream
,
"%25s
\t
%32s
\t
%s
\t
%6.2f
\t
%u/%u
\t
%u/%u"
,
pkey
,
gp
->
register_to
,
sofia_state_names
[
gp
->
state
],
gp
->
ping_time
,
gp
->
ib_failed_calls
,
gp
->
ib_calls
,
gp
->
ob_failed_calls
,
gp
->
ob_calls
);
free
(
pkey
);
if
(
gp
->
state
==
REG_STATE_FAILED
||
gp
->
state
==
REG_STATE_TRYING
)
{
time_t
now
=
switch_epoch_time_now
(
NULL
);
...
...
@@ -4949,6 +4950,7 @@ static int notify_csta_callback(void *pArg, int argc, char **argv, char **column
switch_safe_free
(
route_uri
);
sofia_glue_free_destination
(
dst
);
free
(
extra_headers
);
free
(
id
);
free
(
contact
);
...
...
@@ -5207,6 +5209,7 @@ static void general_event_handler(switch_event_t *event)
const
char
*
csta_event
=
switch_event_get_header
(
event
,
"Feature-Event"
);
char
*
ct
=
"application/x-as-feature-event+xml"
;
char
*
ct_m
=
NULL
;
sofia_profile_t
*
profile
;
...
...
@@ -5258,7 +5261,8 @@ static void general_event_handler(switch_event_t *event)
stream
.
write_function
(
&
stream
,
"--%s--
\r\n
"
,
boundary_string
);
ct
=
switch_mprintf
(
"multipart/mixed; boundary=
\"
%s
\"
"
,
boundary_string
);
ct_m
=
switch_mprintf
(
"multipart/mixed; boundary=
\"
%s
\"
"
,
boundary_string
);
ct
=
ct_m
;
}
else
{
char
*
fwd_type
=
NULL
;
...
...
@@ -5295,6 +5299,7 @@ static void general_event_handler(switch_event_t *event)
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_NOTICE
,
"missing something
\n
"
);
}
switch_safe_free
(
ct_m
);
}
break
;
case
SWITCH_EVENT_SEND_MESSAGE
:
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
e23aa12a
...
...
@@ -3384,6 +3384,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
if
(
zstr
(
name
)
||
switch_regex_match
(
name
,
"^[
\\
w
\\
.
\\
-
\\
_]+$"
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Ignoring invalid name '%s'
\n
"
,
name
?
name
:
"NULL"
);
free
(
pkey
);
goto
skip
;
}
...
...
@@ -8697,9 +8698,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
home
=
NULL
;
}
if
(
etmp
)
{
switch_safe_free
(
etmp
);
}
switch_safe_free
(
etmp
);
}
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
e23aa12a
...
...
@@ -1958,7 +1958,7 @@ static int sofia_dialog_probe_callback(void *pArg, int argc, char **argv, char *
char
*
remote_user
;
char
*
remote_host
;
char
*
remote_uri
;
char
*
local_user_param
=
""
;
char
*
local_user_param
=
NULL
;
char
remote_display_buf
[
512
];
char
*
buf_to_free
=
NULL
;
int
bInternal
=
0
;
...
...
@@ -2091,13 +2091,14 @@ static int sofia_dialog_probe_callback(void *pArg, int argc, char **argv, char *
data
,
uuid
,
call_id
,
to_tag
,
from_tag
,
direction
,
state
,
local_user
,
local_user
,
local_host
,
local_user_param
,
local_user
,
local_user
,
local_host
,
switch_str_nil
(
local_user_param
)
,
local_user
,
local_host
,
!
strcasecmp
(
event_status
,
"hold"
)
?
"no"
:
"yes"
,
remote_display_buf
,
remote_user
,
remote_host
,
remote_uri
);
switch_core_hash_insert
(
h
->
hash
,
key
,
tmp
);
switch_safe_free
(
local_user_param
);
switch_safe_free
(
buf_to_free
);
h
->
rowcount
++
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论