Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ef097a19
提交
ef097a19
authored
1月 16, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-3794 please repat all tests with this version
上级
708f8f1f
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
37 行增加
和
39 行删除
+37
-39
.update
libs/sofia-sip/.update
+1
-1
nua_notifier.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c
+29
-5
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+7
-4
sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_reg.c
+0
-29
没有找到文件。
libs/sofia-sip/.update
浏览文件 @
ef097a19
Mon Jan 16 1
2:47:24
CST 2012
Mon Jan 16 1
7:26:19
CST 2012
libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c
浏览文件 @
ef097a19
...
@@ -428,12 +428,16 @@ int nua_subscribe_server_report(nua_server_request_t *sr, tagi_t const *tags)
...
@@ -428,12 +428,16 @@ int nua_subscribe_server_report(nua_server_request_t *sr, tagi_t const *tags)
* @sa @RFC3265, #nua_i_subscribe, #nua_i_refer, NUTAG_ALLOW_EVENTS()
* @sa @RFC3265, #nua_i_subscribe, #nua_i_refer, NUTAG_ALLOW_EVENTS()
*/
*/
#if 0
static int nua_notify_client_init(nua_client_request_t *cr,
static int nua_notify_client_init(nua_client_request_t *cr,
msg_t *, sip_t *,
msg_t *, sip_t *,
tagi_t const *tags);
tagi_t const *tags);
static int nua_notify_client_init_etag(nua_client_request_t *cr,
static int nua_notify_client_init_etag(nua_client_request_t *cr,
msg_t *msg, sip_t *sip,
msg_t *msg, sip_t *sip,
tagi_t const *tags);
tagi_t const *tags);
static int nua_notify_client_request(nua_client_request_t *cr,
static int nua_notify_client_request(nua_client_request_t *cr,
msg_t *, sip_t *,
msg_t *, sip_t *,
tagi_t const *tags);
tagi_t const *tags);
...
@@ -442,7 +446,8 @@ static int nua_notify_client_report(nua_client_request_t *cr,
...
@@ -442,7 +446,8 @@ static int nua_notify_client_report(nua_client_request_t *cr,
sip_t const *sip,
sip_t const *sip,
nta_outgoing_t *orq,
nta_outgoing_t *orq,
tagi_t const *tags);
tagi_t const *tags);
#endif
#if 0
static nua_client_methods_t const nua_notify_client_methods = {
static nua_client_methods_t const nua_notify_client_methods = {
SIP_METHOD_NOTIFY, /* crm_method, crm_method_name */
SIP_METHOD_NOTIFY, /* crm_method, crm_method_name */
0, /* crm_extra */
0, /* crm_extra */
...
@@ -460,6 +465,25 @@ static nua_client_methods_t const nua_notify_client_methods = {
...
@@ -460,6 +465,25 @@ static nua_client_methods_t const nua_notify_client_methods = {
nua_notify_client_report, /* crm_report */
nua_notify_client_report, /* crm_report */
NULL, /* crm_complete */
NULL, /* crm_complete */
};
};
#endif
nua_client_methods_t
const
nua_notify_client_methods
=
{
SIP_METHOD_NOTIFY
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
/* create_dialog */
1
,
/* in_dialog */
1
,
/* target refresh */
1
},
NULL
,
/* crm_template */
NULL
,
/* crm_init */
NULL
,
/* crm_send */
NULL
,
/* crm_check_restart */
NULL
,
/* crm_recv */
NULL
,
/* crm_preliminary */
NULL
,
/* crm_report */
NULL
,
/* crm_complete */
};
/**@internal Send NOTIFY. */
/**@internal Send NOTIFY. */
int
nua_stack_notify
(
nua_t
*
nua
,
int
nua_stack_notify
(
nua_t
*
nua
,
...
@@ -469,7 +493,7 @@ int nua_stack_notify(nua_t *nua,
...
@@ -469,7 +493,7 @@ int nua_stack_notify(nua_t *nua,
{
{
return
nua_client_create
(
nh
,
e
,
&
nua_notify_client_methods
,
tags
);
return
nua_client_create
(
nh
,
e
,
&
nua_notify_client_methods
,
tags
);
}
}
#if 0
static int nua_notify_client_init(nua_client_request_t *cr,
static int nua_notify_client_init(nua_client_request_t *cr,
msg_t *msg, sip_t *sip,
msg_t *msg, sip_t *sip,
tagi_t const *tags)
tagi_t const *tags)
...
@@ -715,7 +739,7 @@ int nua_notify_client_request(nua_client_request_t *cr,
...
@@ -715,7 +739,7 @@ int nua_notify_client_request(nua_client_request_t *cr,
return nua_base_client_request(cr, msg, sip, tags);
return nua_base_client_request(cr, msg, sip, tags);
}
}
#endif
/** @NUA_EVENT nua_r_notify
/** @NUA_EVENT nua_r_notify
*
*
* Response to an outgoing @b NOTIFY request.
* Response to an outgoing @b NOTIFY request.
...
@@ -747,7 +771,7 @@ int nua_notify_client_request(nua_client_request_t *cr,
...
@@ -747,7 +771,7 @@ int nua_notify_client_request(nua_client_request_t *cr,
*
*
* @END_NUA_EVENT
* @END_NUA_EVENT
*/
*/
#if 0
static int nua_notify_client_report(nua_client_request_t *cr,
static int nua_notify_client_report(nua_client_request_t *cr,
int status, char const *phrase,
int status, char const *phrase,
sip_t const *sip,
sip_t const *sip,
...
@@ -782,7 +806,7 @@ static int nua_notify_client_report(nua_client_request_t *cr,
...
@@ -782,7 +806,7 @@ static int nua_notify_client_report(nua_client_request_t *cr,
return 0;
return 0;
}
}
#endif
static
void
nua_notify_usage_refresh
(
nua_handle_t
*
nh
,
static
void
nua_notify_usage_refresh
(
nua_handle_t
*
nh
,
nua_dialog_state_t
*
ds
,
nua_dialog_state_t
*
ds
,
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
ef097a19
...
@@ -1703,12 +1703,12 @@ static void send_presence_notify(sofia_profile_t *profile,
...
@@ -1703,12 +1703,12 @@ static void send_presence_notify(sofia_profile_t *profile,
cseq
=
sip_cseq_create
(
nh
->
nh_home
,
callsequence
,
SIP_METHOD_NOTIFY
);
cseq
=
sip_cseq_create
(
nh
->
nh_home
,
callsequence
,
SIP_METHOD_NOTIFY
);
nua_handle_bind
(
nh
,
&
mod_sofia_globals
.
destroy_private
);
nua_handle_bind
(
nh
,
&
mod_sofia_globals
.
destroy_private
);
if
(
exptime
>
0
)
{
if
(
exptime
<=
0
)
{
switch_snprintf
(
sstr
,
sizeof
(
sstr
),
"active;expires=%u"
,
(
unsigned
)
exptime
);
exptime
=
5
;
}
else
{
switch_snprintf
(
sstr
,
sizeof
(
sstr
),
"terminated;reason=noresource"
);
}
}
switch_snprintf
(
sstr
,
sizeof
(
sstr
),
"active;expires=%u"
,
(
unsigned
)
exptime
);
tmp
=
(
char
*
)
contact
;
tmp
=
(
char
*
)
contact
;
contact
=
sofia_glue_get_url_from_contact
(
tmp
,
0
);
contact
=
sofia_glue_get_url_from_contact
(
tmp
,
0
);
...
@@ -3701,6 +3701,8 @@ void sofia_presence_check_subscriptions(sofia_profile_t *profile, time_t now)
...
@@ -3701,6 +3701,8 @@ void sofia_presence_check_subscriptions(sofia_profile_t *profile, time_t now)
char
*
sql
;
char
*
sql
;
if
(
now
)
{
if
(
now
)
{
#if 0 // I think actually doing it right and sending terminated notify breaks dumb phones.
sql = switch_mprintf("select full_to, full_from, contact, expires, call_id, event, network_ip, network_port, "
sql = switch_mprintf("select full_to, full_from, contact, expires, call_id, event, network_ip, network_port, "
"NULL as ct, NULL as pt "
"NULL as ct, NULL as pt "
" from sip_subscriptions where (expires = -1 or (expires > 0 and expires <= %ld)) and hostname='%q'",
" from sip_subscriptions where (expires = -1 or (expires > 0 and expires <= %ld)) and hostname='%q'",
...
@@ -3708,6 +3710,7 @@ void sofia_presence_check_subscriptions(sofia_profile_t *profile, time_t now)
...
@@ -3708,6 +3710,7 @@ void sofia_presence_check_subscriptions(sofia_profile_t *profile, time_t now)
sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_presence_send_sql, profile);
sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_presence_send_sql, profile);
switch_safe_free(sql);
switch_safe_free(sql);
#endif
sql
=
switch_mprintf
(
"delete from sip_subscriptions where (expires = -1 or (expires > 0 and expires <= %ld)) and hostname='%q'"
,
sql
=
switch_mprintf
(
"delete from sip_subscriptions where (expires = -1 or (expires > 0 and expires <= %ld)) and hostname='%q'"
,
(
long
)
now
,
mod_sofia_globals
.
hostname
);
(
long
)
now
,
mod_sofia_globals
.
hostname
);
...
...
src/mod/endpoints/mod_sofia/sofia_reg.c
浏览文件 @
ef097a19
...
@@ -572,19 +572,6 @@ int sofia_reg_nat_callback(void *pArg, int argc, char **argv, char **columnNames
...
@@ -572,19 +572,6 @@ int sofia_reg_nat_callback(void *pArg, int argc, char **argv, char **columnNames
}
}
int
sofia_sub_del_callback
(
void
*
pArg
,
int
argc
,
char
**
argv
,
char
**
columnNames
)
{
sofia_profile_t
*
profile
=
(
sofia_profile_t
*
)
pArg
;
nua_handle_t
*
nh
;
if
(
argv
[
0
])
{
if
((
nh
=
nua_handle_by_call_id
(
profile
->
nua
,
argv
[
0
])))
{
nua_handle_destroy
(
nh
);
}
}
return
0
;
}
void
sofia_reg_send_reboot
(
sofia_profile_t
*
profile
,
const
char
*
user
,
const
char
*
host
,
const
char
*
contact
,
const
char
*
user_agent
,
void
sofia_reg_send_reboot
(
sofia_profile_t
*
profile
,
const
char
*
user
,
const
char
*
host
,
const
char
*
contact
,
const
char
*
user_agent
,
const
char
*
network_ip
)
const
char
*
network_ip
)
{
{
...
@@ -760,18 +747,6 @@ void sofia_reg_check_expire(sofia_profile_t *profile, time_t now, int reboot)
...
@@ -760,18 +747,6 @@ void sofia_reg_check_expire(sofia_profile_t *profile, time_t now, int reboot)
sofia_glue_actually_execute_sql
(
profile
,
sql
,
NULL
);
sofia_glue_actually_execute_sql
(
profile
,
sql
,
NULL
);
if
(
now
)
{
switch_snprintf
(
sql
,
sizeof
(
sql
),
"select call_id from sip_subscriptions where (expires = -1 or (expires > 0 and expires <= %ld)) and hostname='%s'"
,
(
long
)
now
,
mod_sofia_globals
.
hostname
);
}
else
{
switch_snprintfv
(
sql
,
sizeof
(
sql
),
"select sub_to_user,sub_to_host,call_id from sip_subscriptions where expires >= -1 and hostname='%q'"
,
mod_sofia_globals
.
hostname
);
}
sofia_glue_execute_sql_callback
(
profile
,
NULL
,
sql
,
sofia_sub_del_callback
,
profile
);
sofia_presence_check_subscriptions
(
profile
,
now
);
sofia_presence_check_subscriptions
(
profile
,
now
);
if
(
now
)
{
if
(
now
)
{
...
@@ -879,10 +854,6 @@ void sofia_reg_check_sync(sofia_profile_t *profile)
...
@@ -879,10 +854,6 @@ void sofia_reg_check_sync(sofia_profile_t *profile)
switch_snprintfv
(
sql
,
sizeof
(
sql
),
"delete from sip_authentication where expires > 0 and hostname='%q'"
,
mod_sofia_globals
.
hostname
);
switch_snprintfv
(
sql
,
sizeof
(
sql
),
"delete from sip_authentication where expires > 0 and hostname='%q'"
,
mod_sofia_globals
.
hostname
);
sofia_glue_actually_execute_sql
(
profile
,
sql
,
NULL
);
sofia_glue_actually_execute_sql
(
profile
,
sql
,
NULL
);
switch_snprintfv
(
sql
,
sizeof
(
sql
),
"select sub_to_user,sub_to_host,call_id from sip_subscriptions where expires >= -1 and hostname='%q'"
,
mod_sofia_globals
.
hostname
);
sofia_glue_execute_sql_callback
(
profile
,
NULL
,
sql
,
sofia_sub_del_callback
,
profile
);
switch_snprintfv
(
sql
,
sizeof
(
sql
),
"delete from sip_subscriptions where expires >= -1 and hostname='%q'"
,
mod_sofia_globals
.
hostname
);
switch_snprintfv
(
sql
,
sizeof
(
sql
),
"delete from sip_subscriptions where expires >= -1 and hostname='%q'"
,
mod_sofia_globals
.
hostname
);
sofia_glue_actually_execute_sql
(
profile
,
sql
,
NULL
);
sofia_glue_actually_execute_sql
(
profile
,
sql
,
NULL
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论