Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
0ce92e4c
提交
0ce92e4c
authored
1月 26, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wire in tport error callback to nua_stack_tport_error
上级
9cc550ee
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
40 行增加
和
0 行删除
+40
-0
nta.c
libs/sofia-sip/libsofia-sip-ua/nta/nta.c
+19
-0
nta_tport.h
libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tport.h
+12
-0
nua_register.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
+9
-0
没有找到文件。
libs/sofia-sip/libsofia-sip-ua/nta/nta.c
浏览文件 @
0ce92e4c
...
...
@@ -149,6 +149,9 @@ struct nta_agent_s
nta_update_magic_t
*
sa_update_magic
;
nta_update_tport_f
*
sa_update_tport
;
nta_error_magic_t
*
sa_error_magic
;
nta_error_tport_f
*
sa_error_tport
;
su_time_t
sa_now
;
/**< Timestamp in microsecond resolution. */
uint32_t
sa_next
;
/**< Timestamp for next agent_timer. */
uint32_t
sa_millisec
;
/**< Timestamp in milliseconds. */
...
...
@@ -2720,6 +2723,10 @@ void agent_tp_error(nta_agent_t *agent,
"nta_agent: tport: %s%s%s
\n
"
,
remote
?
remote
:
""
,
remote
?
": "
:
""
,
su_strerror
(
errcode
));
if
(
agent
->
sa_error_tport
)
{
agent
->
sa_error_tport
(
agent
->
sa_error_magic
,
agent
,
tport
);
}
}
/** Handle updated transport addresses */
...
...
@@ -11783,6 +11790,18 @@ int nta_agent_bind_tport_update(nta_agent_t *agent,
return
0
;
}
/** Bind transport error callback */
int
nta_agent_bind_tport_error
(
nta_agent_t
*
agent
,
nta_error_magic_t
*
magic
,
nta_error_tport_f
*
callback
)
{
if
(
!
agent
)
return
su_seterrno
(
EFAULT
),
-
1
;
agent
->
sa_error_magic
=
magic
;
agent
->
sa_error_tport
=
callback
;
return
0
;
}
/** Check if public transport binding is in progress */
int
nta_agent_tport_is_updating
(
nta_agent_t
*
agent
)
{
...
...
libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tport.h
浏览文件 @
0ce92e4c
...
...
@@ -54,6 +54,11 @@ typedef TPORT_T tport_t;
#endif
typedef
NTA_UPDATE_MAGIC_T
nta_update_magic_t
;
#ifndef NTA_ERROR_MAGIC_T
#define NTA_ERROR_MAGIC_T void
#endif
typedef
NTA_ERROR_MAGIC_T
nta_error_magic_t
;
struct
sigcomp_compartment
;
struct
sigcomp_udvm
;
...
...
@@ -77,11 +82,18 @@ SOFIAPUBFUN void nta_compartment_decref(struct sigcomp_compartment **);
typedef
void
nta_update_tport_f
(
nta_update_magic_t
*
,
nta_agent_t
*
);
typedef
void
nta_error_tport_f
(
nta_error_magic_t
*
,
nta_agent_t
*
,
tport_t
*
);
SOFIAPUBFUN
int
nta_agent_bind_tport_update
(
nta_agent_t
*
agent
,
nta_update_magic_t
*
magic
,
nta_update_tport_f
*
);
SOFIAPUBFUN
int
nta_agent_bind_tport_error
(
nta_agent_t
*
agent
,
nta_error_magic_t
*
magic
,
nta_error_tport_f
*
callback
);
SOFIA_END_DECLS
#endif
/* !defined NTA_TPORT_H */
libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
浏览文件 @
0ce92e4c
...
...
@@ -49,6 +49,7 @@
#include <sofia-sip/sip_status.h>
#define NTA_UPDATE_MAGIC_T struct nua_s
#define NTA_ERROR_MAGIC_T struct nua_s
#include "nua_stack.h"
...
...
@@ -1138,6 +1139,7 @@ static int nua_register_usage_shutdown(nua_handle_t *nh,
#endif
static
void
nua_stack_tport_update
(
nua_t
*
nua
,
nta_agent_t
*
nta
);
static
void
nua_stack_tport_error
(
nua_t
*
nua
,
nta_agent_t
*
nta
,
tport_t
*
tport
);
static
int
nua_registration_add_contact_and_route
(
nua_handle_t
*
nh
,
nua_registration_t
*
nr
,
msg_t
*
msg
,
...
...
@@ -1372,6 +1374,7 @@ nua_stack_init_registrations(nua_t *nua)
}
nta_agent_bind_tport_update
(
nua
->
nua_nta
,
(
nta_update_magic_t
*
)
nua
,
nua_stack_tport_update
);
nta_agent_bind_tport_error
(
nua
->
nua_nta
,
(
nta_error_magic_t
*
)
nua
,
nua_stack_tport_error
);
return
0
;
}
...
...
@@ -1476,6 +1479,12 @@ int nua_registration_from_via(nua_registration_t **list,
return
0
;
}
static
void
nua_stack_tport_error
(
nua_t
*
nua
,
nta_agent_t
*
nta
,
tport_t
*
tport
)
{
return
;
}
static
void
nua_stack_tport_update
(
nua_t
*
nua
,
nta_agent_t
*
nta
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论