Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ca63c019
提交
ca63c019
authored
2月 27, 2008
作者:
Michael Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rollback
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7762
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
bf964b2e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
395 行增加
和
605 行删除
+395
-605
nua_dialog.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
+2
-6
nua_dialog.h
libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h
+2
-4
nua_extension.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c
+8
-11
nua_message.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_message.c
+8
-12
nua_notifier.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c
+17
-34
nua_options.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_options.c
+8
-11
nua_params.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c
+179
-196
nua_params.h
libs/sofia-sip/libsofia-sip-ua/nua/nua_params.h
+5
-30
nua_publish.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c
+9
-11
nua_register.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
+8
-11
nua_session.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
+86
-132
nua_stack.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
+6
-11
nua_stack.h
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h
+20
-10
nua_subnotref.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c
+21
-27
nua_tag.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_tag.c
+15
-87
nua_tag.h
libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
+1
-12
没有找到文件。
libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
浏览文件 @
ca63c019
...
...
@@ -373,12 +373,8 @@ void nua_dialog_usage_remove_at(nua_owner_t *own,
/* Destroy saved client request */
if
(
nua_client_is_bound
(
du
->
du_cr
))
{
nua_client_bind
(
cr
=
du
->
du_cr
,
NULL
);
if
(
nua_client_is_queued
(
cr
))
nua_client_request_complete
(
cr
);
else
if
(
nua_client_is_reporting
(
cr
))
;
else
if
(
!
nua_client_is_queued
(
cr
)
&&
!
nua_client_is_reporting
(
cr
))
nua_client_request_destroy
(
cr
);
}
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h
浏览文件 @
ca63c019
...
...
@@ -253,11 +253,11 @@ typedef struct {
nta_outgoing_t
*
orq
,
tagi_t
const
*
tags
);
/** @a crm_
complete
is called when a client-side request is destroyed.
/** @a crm_
deinit
is called when a client-side request is destroyed.
*
* @return The return value should be 0. It is currently ignored.
*/
int
(
*
crm_
complete
)(
nua_client_request_t
*
);
int
(
*
crm_
deinit
)(
nua_client_request_t
*
);
}
nua_client_methods_t
;
...
...
@@ -516,8 +516,6 @@ void *nua_private_client_request(nua_client_request_t const *cr)
return
(
void
*
)(
cr
+
1
);
}
void
nua_client_request_complete
(
nua_client_request_t
*
);
void
nua_client_request_destroy
(
nua_client_request_t
*
);
int
nua_client_request_queue
(
nua_client_request_t
*
cr
);
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c
浏览文件 @
ca63c019
...
...
@@ -74,21 +74,18 @@
*/
static
nua_client_methods_t
const
nua_method_client_methods
=
{
SIP_METHOD_UNKNOWN
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
SIP_METHOD_UNKNOWN
,
0
,
{
/* create_dialog */
0
,
/* in_dialog */
0
,
/* 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 */
/* nua_method_client_template */
NULL
,
/* nua_method_client_init */
NULL
,
/* nua_method_client_request */
NULL
,
/* nua_method_client_check_restart */
NULL
,
/* nua_method_client_response */
NULL
};
int
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_message.c
浏览文件 @
ca63c019
...
...
@@ -77,22 +77,18 @@ static int nua_message_client_init(nua_client_request_t *cr,
tagi_t
const
*
tags
);
static
nua_client_methods_t
const
nua_message_client_methods
=
{
SIP_METHOD_MESSAGE
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
SIP_METHOD_MESSAGE
,
0
,
{
/* create_dialog */
0
,
/* in_dialog */
0
,
/* target refresh */
0
},
NULL
,
/* crm_template */
nua_message_client_init
,
/* crm_init */
NULL
,
/* crm_send */
NULL
,
/* crm_check_restart */
NULL
,
/* crm_recv */
NULL
,
/* crm_preliminary */
NULL
,
/* crm_report */
NULL
,
/* crm_complete */
/* nua_message_client_template */
NULL
,
nua_message_client_init
,
/*nua_message_client_request*/
NULL
,
/* nua_message_client_check_restart */
NULL
,
/*nua_message_client_response*/
NULL
};
int
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c
浏览文件 @
ca63c019
...
...
@@ -237,8 +237,7 @@ int nua_subscribe_server_preprocess(nua_server_request_t *sr)
sip_event_t
*
o
=
sip
->
sip_event
;
char
const
*
event
=
o
?
o
->
o_type
:
NULL
;
/* Maximum expiration time */
unsigned
long
expires
=
sip
->
sip_expires
?
sip
->
sip_expires
->
ex_delta
:
3600
;
sip_time_t
now
=
sip_now
();
unsigned
long
expires
=
3600
;
assert
(
nh
&&
nh
->
nh_nua
->
nua_dhandle
!=
nh
);
...
...
@@ -260,10 +259,9 @@ int nua_subscribe_server_preprocess(nua_server_request_t *sr)
nu
=
nua_dialog_usage_private
(
du
);
if
(
now
+
expires
>=
now
)
nu
->
nu_requested
=
now
+
expires
;
else
nu
->
nu_requested
=
SIP_TIME_MAX
-
1
;
if
(
sip
->
sip_expires
&&
sip
->
sip_expires
->
ex_delta
<
expires
)
expires
=
sip
->
sip_expires
->
ex_delta
;
nu
->
nu_requested
=
sip_now
()
+
expires
;
#if SU_HAVE_EXPERIMENTAL
nu
->
nu_etags
=
...
...
@@ -297,23 +295,9 @@ int nua_subscribe_server_respond(nua_server_request_t *sr, tagi_t const *tags)
sip_time_t
now
=
sip_now
();
if
(
nu
->
nu_requested
)
{
if
(
sip
->
sip_expires
)
{
/* Expires in response can only shorten the expiration time */
if
(
nu
->
nu_requested
>
now
+
sip
->
sip_expires
->
ex_delta
)
nu
->
nu_requested
=
now
+
sip
->
sip_expires
->
ex_delta
;
}
else
{
unsigned
sub_expires
=
NH_PGET
(
sr
->
sr_owner
,
sub_expires
);
if
(
nu
->
nu_requested
>
now
+
sub_expires
)
nu
->
nu_requested
=
now
+
sub_expires
;
}
if
(
nu
->
nu_requested
>=
now
)
if
(
nu
->
nu_requested
>
nu
->
nu_expires
)
nu
->
nu_expires
=
nu
->
nu_requested
;
else
nu
->
nu_expires
=
now
;
if
(
nu
->
nu_expires
<=
now
)
else
if
(
nu
->
nu_expires
<=
now
||
nu
->
nu_requested
<=
now
)
nu
->
nu_substate
=
nua_substate_terminated
;
}
...
...
@@ -321,7 +305,7 @@ int nua_subscribe_server_respond(nua_server_request_t *sr, tagi_t const *tags)
ex
->
ex_delta
=
nu
->
nu_expires
-
now
;
}
else
{
/* A
lways a
dd header Expires: 0 */
/* Add header Expires: 0 */
}
if
(
!
sip
->
sip_expires
||
sip
->
sip_expires
->
ex_delta
>
ex
->
ex_delta
)
...
...
@@ -436,21 +420,20 @@ static int nua_notify_client_report(nua_client_request_t *cr,
tagi_t
const
*
tags
);
static
nua_client_methods_t
const
nua_notify_client_methods
=
{
SIP_METHOD_NOTIFY
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
SIP_METHOD_NOTIFY
,
0
,
{
/* create_dialog */
1
,
/* in_dialog */
1
,
/* target refresh */
1
},
NULL
,
/* crm_template */
nua_notify_client_init
,
/* crm_init */
nua_notify_client_request
,
/* crm_send */
NULL
,
/* crm_check_restart */
NULL
,
/* crm_recv */
NULL
,
/* crm_preliminary */
nua_notify_client_report
,
/* crm_report */
NULL
,
/* crm_complete */
/* nua_notify_client_template */
NULL
,
nua_notify_client_init
,
nua_notify_client_request
,
/* nua_notify_client_check_restart */
NULL
,
/* nua_notify_client_response */
NULL
,
/* nua_notify_client_preliminary */
NULL
,
nua_notify_client_report
};
/**@internal Send NOTIFY. */
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_options.c
浏览文件 @
ca63c019
...
...
@@ -88,21 +88,18 @@
*/
static
nua_client_methods_t
const
nua_options_client_methods
=
{
SIP_METHOD_OPTIONS
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
SIP_METHOD_OPTIONS
,
0
,
{
/* create_dialog */
0
,
/* in_dialog */
0
,
/* target refresh */
0
},
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 */
/*nua_options_client_template*/
NULL
,
/*nua_options_client_init*/
NULL
,
/*nua_options_client_request*/
NULL
,
/* nua_options_client_check_restart */
NULL
,
/*nua_options_client_response*/
NULL
};
int
nua_stack_options
(
nua_t
*
nua
,
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c
浏览文件 @
ca63c019
差异被折叠。
点击展开。
libs/sofia-sip/libsofia-sip-ua/nua/nua_params.h
浏览文件 @
ca63c019
...
...
@@ -107,7 +107,6 @@ typedef struct nua_handle_preferences
/* Subscriber state, i.e. nua_substate_pending */
unsigned
nhp_substate
;
unsigned
nhp_sub_expires
;
/* REGISTER keepalive intervals */
unsigned
nhp_keepalive
,
nhp_keepalive_stream
;
...
...
@@ -128,6 +127,9 @@ typedef struct nua_handle_preferences
/** Outbound OPTIONS */
char
const
*
nhp_outbound
;
/** Network detection: NONE, INFORMAL, TRY_FULL */
int
nhp_detect_network_updates
;
sip_allow_t
*
nhp_appl_method
;
/** Initial route set */
...
...
@@ -135,12 +137,6 @@ typedef struct nua_handle_preferences
union
{
struct
{
/* A bit for each feature set by application */
/* NOTE:
Some compilers behave weird if there are bitfields
together with width > 32
So there should be a padding field (unsigned:0;)
every 32 bits.
*/
unsigned
nhb_retry_count
:
1
;
unsigned
nhb_max_subscriptions
:
1
;
...
...
@@ -170,15 +166,13 @@ typedef struct nua_handle_preferences
unsigned
nhb_refer_with_id
:
1
;
unsigned
nhb_refer_expires
:
1
;
unsigned
nhb_substate
:
1
;
unsigned
nhb_sub_expires
:
1
;
unsigned
nhb_keepalive
:
1
;
unsigned
nhb_keepalive_stream
:
1
;
unsigned
nhb_registrar
:
1
;
unsigned
nhb_allow
:
1
;
unsigned
:
0
;
/* at most 32 bits before this point */
unsigned
nhb_supported
:
1
;
unsigned
:
0
;
/* at most 32 bits ... */
unsigned
nhb_allow_events
:
1
;
unsigned
nhb_user_agent
:
1
;
unsigned
nhb_organization
:
1
;
...
...
@@ -189,6 +183,7 @@ typedef struct nua_handle_preferences
unsigned
nhb_m_features
:
1
;
unsigned
nhb_instance
:
1
;
unsigned
nhb_outbound
:
1
;
unsigned
nhb_detect_network_updates
:
1
;
unsigned
nhb_appl_method
:
1
;
unsigned
nhb_initial_route
:
1
;
unsigned
:
0
;
...
...
@@ -199,26 +194,6 @@ typedef struct nua_handle_preferences
#define nhp_set nhp_set_.set_bits
/** Global preferences for nua. */
typedef
struct
{
/** Network detection: NONE, INFORMAL, TRY_FULL */
signed
int
ngp_detect_network_updates
:
3
;
/** Pass events during shutdown, too */
int
ngp_shutdown_events
:
1
;
unsigned
:
0
;
/* pad */
union
{
struct
{
/* A bit for each feature set by application */
unsigned
ngp_detect_network_updates
:
1
;
unsigned
ngp_shutdown_events
:
1
;
unsigned
:
0
;
}
set_bits
;
unsigned
set_unsigned
[
2
];
}
ngp_set_
;
}
nua_global_preferences_t
;
#define ngp_set ngp_set_.set_bits
#define DNHP_GET(dnhp, pref) ((dnhp)->nhp_##pref)
#define NHP_GET(nhp, dnhp, pref) \
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c
浏览文件 @
ca63c019
...
...
@@ -244,21 +244,19 @@ static int nua_publish_client_response(nua_client_request_t *cr,
sip_t
const
*
sip
);
static
nua_client_methods_t
const
nua_publish_client_methods
=
{
SIP_METHOD_PUBLISH
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
SIP_METHOD_PUBLISH
,
0
,
{
/* create_dialog */
0
,
/* in_dialog */
0
,
/* target refresh */
0
},
nua_publish_client_template
,
/* crm_template */
nua_publish_client_init
,
/* crm_init */
nua_publish_client_request
,
/* crm_send */
nua_publish_client_check_restart
,
/* crm_check_restart */
nua_publish_client_response
,
/* crm_recv */
NULL
,
/* crm_preliminary */
NULL
,
/* crm_report */
NULL
,
/* crm_complete */
nua_publish_client_template
,
nua_publish_client_init
,
nua_publish_client_request
,
nua_publish_client_check_restart
,
nua_publish_client_response
,
/* nua_publish_client_preliminary */
NULL
};
/**@internal Send PUBLISH. */
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
浏览文件 @
ca63c019
...
...
@@ -570,21 +570,18 @@ static int nua_register_client_response(nua_client_request_t *cr,
sip_t
const
*
sip
);
static
nua_client_methods_t
const
nua_register_client_methods
=
{
SIP_METHOD_REGISTER
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
SIP_METHOD_REGISTER
,
0
,
{
/* create_dialog */
1
,
/* in_dialog */
0
,
/* target refresh */
0
},
nua_register_client_template
,
/* crm_template */
nua_register_client_init
,
/* crm_init */
nua_register_client_request
,
/* crm_send */
nua_register_client_check_restart
,
/* crm_check_restart */
nua_register_client_response
,
/* crm_recv */
NULL
,
/* crm_preliminary */
NULL
,
/* crm_report */
NULL
,
/* crm_complete */
nua_register_client_template
,
nua_register_client_init
,
nua_register_client_request
,
nua_register_client_check_restart
,
nua_register_client_response
};
/**@internal Send REGISTER. */
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
浏览文件 @
ca63c019
差异被折叠。
点击展开。
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
浏览文件 @
ca63c019
...
...
@@ -209,7 +209,7 @@ int nua_stack_init(su_root_t *root, nua_t *nua)
if
(
nua_stack_set_from
(
nua
,
1
,
nua
->
nua_args
)
<
0
)
return
-
1
;
if
(
nua
->
nua_prefs
->
ngp_detect_network_updates
)
if
(
NHP_ISSET
(
dnh
->
nh_prefs
,
detect_network_updates
)
)
nua_stack_launch_network_change_detector
(
nua
);
nua_stack_timer
(
nua
,
nua
->
nua_timer
,
NULL
);
...
...
@@ -293,8 +293,7 @@ int nua_stack_event(nua_t *nua, nua_handle_t *nh, msg_t *msg,
if
((
event
>
nua_r_authenticate
&&
event
<=
nua_r_ack
)
||
event
<
nua_i_error
||
(
nh
&&
!
nh
->
nh_valid
)
||
(
nua
->
nua_shutdown
&&
event
!=
nua_r_shutdown
&&
!
nua
->
nua_prefs
->
ngp_shutdown_events
))
{
)
{
if
(
msg
)
msg_destroy
(
msg
);
return
event
;
...
...
@@ -2076,13 +2075,6 @@ nua_client_request_t *nua_client_request_remove(nua_client_request_t *cr)
return
cr
;
}
void
nua_client_request_complete
(
nua_client_request_t
*
cr
)
{
nua_client_request_remove
(
cr
);
if
(
cr
&&
cr
->
cr_methods
->
crm_complete
)
cr
->
cr_methods
->
crm_complete
(
cr
);
}
void
nua_client_request_destroy
(
nua_client_request_t
*
cr
)
{
nua_handle_t
*
nh
;
...
...
@@ -2090,12 +2082,14 @@ void nua_client_request_destroy(nua_client_request_t *cr)
if
(
cr
==
NULL
)
return
;
nua_client_request_complete
(
cr
);
if
(
cr
->
cr_methods
->
crm_deinit
)
cr
->
cr_methods
->
crm_deinit
(
cr
);
nh
=
cr
->
cr_owner
;
nua_destroy_signal
(
cr
->
cr_signal
);
nua_client_request_remove
(
cr
);
nua_client_bind
(
cr
,
NULL
);
if
(
cr
->
cr_msg
)
...
...
@@ -2104,6 +2098,7 @@ void nua_client_request_destroy(nua_client_request_t *cr)
if
(
cr
->
cr_orq
)
nta_outgoing_destroy
(
cr
->
cr_orq
);
cr
->
cr_orq
=
NULL
;
if
(
cr
->
cr_timer
)
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h
浏览文件 @
ca63c019
...
...
@@ -217,31 +217,28 @@ struct nua_s {
su_clone_r
nua_clone
;
su_task_r
nua_client
;
su_network_changed_t
*
nua_nw_changed
;
nua_callback_f
nua_callback
;
nua_magic_t
*
nua_magic
;
nua_event_frame_t
*
nua_current
;
nua_saved_event_t
nua_signal
[
1
];
/**< Used by stop-and-wait args calls */
tagi_t
const
*
nua_args
;
/* Engine state flags */
sip_time_t
nua_shutdown
;
unsigned
nua_shutdown_started
:
1
;
/**< Shutdown initiated */
unsigned
nua_shutdown_final
:
1
;
/**< Shutdown is complete */
unsigned
nua_from_is_set
;
unsigned
:
0
;
/**<
Local SIP address. Contents are kept around for ever.
*/
sip_from_t
nua_from
[
1
]
;
/**<
Used by stop-and-wait args calls
*/
tagi_t
const
*
nua_args
;
/* ---------------------------------------------------------------------- */
/**< Local SIP address. Contents are kept around for ever. */
sip_from_t
nua_from
[
1
];
/* Protocol (server) side */
su_network_changed_t
*
nua_nw_changed
;
nua_registration_t
*
nua_registrations
;
/**< Active registrations */
...
...
@@ -253,8 +250,21 @@ struct nua_s {
nta_agent_t
*
nua_nta
;
su_timer_t
*
nua_timer
;
void
*
nua_sip_parser
;
sip_time_t
nua_shutdown
;
/* Route */
sip_service_route_t
*
nua_service_route
;
/* User-agent parameters */
nua_global_preferences_t
nua_prefs
[
1
];
unsigned
nua_media_enable
:
1
;
unsigned
:
0
;
#if HAVE_SMIME
/* Start NRC Boston */
sm_object_t
*
sm
;
#endif
/* End NRC Boston */
nua_handle_t
*
nua_handles
;
nua_handle_t
**
nua_handles_tail
;
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c
浏览文件 @
ca63c019
...
...
@@ -183,21 +183,18 @@ static int nua_subscribe_client_response(nua_client_request_t *cr,
sip_t
const
*
sip
);
static
nua_client_methods_t
const
nua_subscribe_client_methods
=
{
SIP_METHOD_SUBSCRIBE
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
SIP_METHOD_SUBSCRIBE
,
0
,
{
/* create_dialog */
1
,
/* in_dialog */
1
,
/* target refresh */
1
},
NULL
,
/* crm_template */
nua_subscribe_client_init
,
/* crm_init */
nua_subscribe_client_request
,
/* crm_send */
NULL
,
/* crm_check_restart */
nua_subscribe_client_response
,
/* crm_recv */
NULL
,
/* crm_preliminary */
NULL
,
/* crm_report */
NULL
,
/* crm_complete */
NULL
,
nua_subscribe_client_init
,
nua_subscribe_client_request
,
/* nua_subscribe_client_check_restart */
NULL
,
nua_subscribe_client_response
};
int
...
...
@@ -371,9 +368,6 @@ static int nua_subscribe_client_response(nua_client_request_t *cr,
else
delta
=
0
;
if
(
delta
>
eu
->
eu_expires
)
delta
=
eu
->
eu_expires
;
if
(
win_messenger_enable
&&
!
nua_dialog_is_established
(
nh
->
nh_ds
))
{
/* Notify from messanger does not match with dialog tag */
nh
->
nh_ds
->
ds_remote_tag
=
su_strdup
(
nh
->
nh_home
,
""
);
...
...
@@ -653,6 +647,8 @@ int nua_notify_server_report(nua_server_request_t *sr, tagi_t const *tags)
if
(
substate
==
nua_substate_active
||
substate
==
nua_substate_pending
)
{
if
(
subs
&&
subs
->
ss_expires
)
delta
=
strtoul
(
subs
->
ss_expires
,
NULL
,
10
);
else
delta
=
eu
->
eu_expires
;
}
else
if
(
substate
==
nua_substate_embryonic
)
{
if
(
subs
&&
subs
->
ss_reason
)
{
...
...
@@ -690,8 +686,7 @@ int nua_notify_server_report(nua_server_request_t *sr, tagi_t const *tags)
nua_dialog_usage_set_refresh_range
(
du
,
retry
,
retry
+
5
);
}
else
{
if
(
delta
<
SIP_TIME_MAX
)
nua_dialog_usage_set_refresh
(
du
,
delta
);
nua_dialog_usage_set_refresh
(
du
,
delta
);
}
return
retval
;
...
...
@@ -782,21 +777,20 @@ static int nua_refer_client_response(nua_client_request_t *cr,
sip_t
const
*
sip
);
static
nua_client_methods_t
const
nua_refer_client_methods
=
{
SIP_METHOD_REFER
,
/* crm_method, crm_method_name */
0
,
/* crm_extra */
{
/* crm_flags */
SIP_METHOD_REFER
,
0
,
{
/* create_dialog */
1
,
/* in_dialog */
1
,
/* target refresh */
1
},
NULL
,
/* crm_template */
nua_refer_client_init
,
/* crm_init */
nua_refer_client_request
,
/* crm_send */
NULL
,
/* crm_check_restart */
nua_refer_client_response
,
/* crm_recv */
nua_refer_client_response
,
/* crm_preliminary */
NULL
,
/* crm_report */
NULL
,
/* crm_complete */
/*nua_refer_client_template*/
NULL
,
nua_refer_client_init
,
nua_refer_client_request
,
/* nua_refer_client_check_restart */
NULL
,
nua_refer_client_response
,
nua_refer_client_response
,
/* Preliminary */
NULL
};
int
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_tag.c
浏览文件 @
ca63c019
...
...
@@ -227,22 +227,21 @@
* - NUTAG_ALLOW_EVENTS(), SIPTAG_ALLOW_EVENTS(), and
* SIPTAG_ALLOW_EVENTS_STR()
* - NUTAG_MAX_SUBSCRIPTIONS()
* - NUTAG_SUBSTATE()
, NUTAG_SUB_EXPIRES()
* - NUTAG_SUBSTATE()
* @par Specifications
* - @RFC3265
*
* @par SIP Event Subscriber
* - nua_subscribe(), #nua_r_subscribe, #nua_i_notify, NUTAG_SUBSTATE(),
* SIPTAG_EVENT(), SIPTAG_EXPIRES()
* SIPTAG_EVENT(), SIPTAG_EXPIRES()
,
* - nua_unsubscribe(), #nua_r_unsubscribe()
* @par Specifications
* - @RFC3265
*
* @par SIP Event Notifier
* - #nua_i_subscribe(), nua_notify(), #nua_r_notify,
* NUTAG_SUBSTATE(),
NUTAG_SUB_EXPIRES(),
SIPTAG_EVENT()
* NUTAG_SUBSTATE(), SIPTAG_EVENT()
* Settings:
* - NUTAG_SUB_EXPIRES()
* - NUTAG_ALLOW_EVENTS(), SIPTAG_ALLOW_EVENTS(), and
* SIPTAG_ALLOW_EVENTS_STR()
* - NUTAG_ALLOW("SUBSCRIBE"), NUTAG_APPL_METHOD("SUBSCRIBE")
...
...
@@ -268,8 +267,6 @@
* Settings:
* - NUTAG_ALLOW(x), NUTAG_APPL_METHOD(x)
*
* @par Server Shutdown
* - nua_shutdown(), NUTAG_SHUTDOWN_EVENTS(), nua_destroy().
*/
/* @par S/MIME
...
...
@@ -770,14 +767,14 @@ tag_typedef_t nutag_answer_sent = BOOLTAG_TYPEDEF(answer_sent);
*
* @par Used with
* - with nua_create(), nua_set_params(), nua_get_params(),
* nua_handle(), nua_set_hparams(), nua_get_hparams(), and
* nua_notifier() to change the default subscription state returned by
*
the inter
nal event server
*
nua_handle(), nua_set_hparams(), nua_get_hparams(), and
*
nua_notifier() to change the default subscription state returned by
*
the inte
nal event server
* - with nua_notify() and nua_respond() to SUBSCRIBE to determine the
* subscription state (if application include @SubscriptionState
* header in the tag list, the NUTAG_SUBSTATE() value is ignored)
*
subscription state (if application include @SubscriptionState
*
header in the tag list, the NUTAG_SUBSTATE() value is ignored)
* - with #nua_r_subscribe, #nua_i_notify, #nua_i_subscribe, and #nua_r_notify
* to indicate the current subscription state
*
to indicate the current subscription state
*
* @par Parameter type
* int
...
...
@@ -809,39 +806,6 @@ tag_typedef_t nutag_substate = INTTAG_TYPEDEF(substate);
*/
/**@def NUTAG_SUB_EXPIRES()
*
* Default expiration time of subscriptions.
*
* @par Used with
* - with nua_create(), nua_set_params(), nua_get_params(), nua_handle(),
* nua_set_hparams(), nua_get_hparams(), nua_respond(), nua_notify(), and
* nua_notifier() to change the default expiration time of subscriptions
*
* @par Parameter type
* unsigned int
*
* @par Values
* - default expiration time in seconds
*
* Note that the expires parameter in @SubscriptionState or @Expires header
* in the nua_response() to the SUBSCRIBE overrides the default subscription
* expiration specified by NUTAG_SUB_EXPIRES().
*
* @sa @RFC3265, NUTAG_REFER_EXPIRES(), @Expires, SIPTAG_EXPIRES(),
* SIPTAG_EXPIRES_STR(), @SubscriptionState, nua_respond(), nua_notifier(),
* #nua_r_subscribe, #nua_i_subscribe, #nua_r_refer, #nua_r_notify,
* #nua_i_notify.
*
* Corresponding tag taking reference parameter is NUTAG_SUB_EXPIRES_REF().
*/
tag_typedef_t
nutag_sub_expires
=
UINTTAG_TYPEDEF
(
substate
);
/**@def NUTAG_SUB_EXPIRES_REF(x)
* Reference tag for NUTAG_SUB_EXPIRES().
*/
/**@def NUTAG_NEWSUB()
*
* Send unsolicited NOTIFY request.
...
...
@@ -1111,17 +1075,17 @@ tag_typedef_t nutag_update_refresh = BOOLTAG_TYPEDEF(update_refresh);
* REFER.
*
* @par Used with
* nua_handle(), nua_respond() \n
* nua_set_params() or nua_set_hparams() \n
* nua_get_params() or nua_get_hparams()
* nua_set_params() \n
* nua_get_params() \n
* nua_set_hparams() \n
* nua_get_hparams() \n
*
* @par Parameter type
* unsigned int
*
* @par Values
* - default interval in seconds
*
* @sa NUTAG_SUB_EXPIRES()
* @c 0 disable \n
* @c >0 interval in seconds
*
* Corresponding tag taking reference parameter is NUTAG_REFER_EXPIRES_REF().
*/
...
...
@@ -1606,9 +1570,6 @@ extern msg_hclass_t sip_route_class[];
* NUTAG_INITIAL_ROUTE_STR() tags, the route set is constructed from them
* all.
*
* The initial route is inserted into request message before the route
* entries set with SIPTAG_ROUTE() or SIPTAG_ROUTE_STR().
*
* @par Used with
* nua_set_params() \n
* nua_set_hparams() \n
...
...
@@ -2775,39 +2736,6 @@ tag_typedef_t nutag_dialog = UINTTAG_TYPEDEF(dialog);
* Reference tag for NUTAG_SIP_PARSER().
*/
/**@def NUTAG_SHUTDOWN_EVENTS(x)
*
* Allow passing of normal events when stack is being shut down.
*
* By default, only #nua_r_shutdown events are passed to application after
* calling nua_shutdown(). If application is interested in nua events during
* shutdown, it should give NUTAG_SHUTDOWN_EVENTS(1) to nua_create() or
* nua_set_params() called before nua_shutdown().
*
* @par Used with
* nua_create(), nua_set_params().
*
* @par Parameter type
* int (boolean)
*
* @par Values
* @c 0 False \n
* @c !=0 True
*
* Corresponding tag taking reference parameter is NUTAG_SHUTDOWN_EVENTS_REF().
*
* @sa nua_shutdown(), nua_destroy().
*
* @NEW_1_12_9.
*/
tag_typedef_t
nutag_shutdown_events
=
BOOLTAG_TYPEDEF
(
shutdown_events
);
/**@def NUTAG_SHUTDOWN_EVENTS_REF(x)
* Reference tag for NUTAG_SHUTDOWN_EVENTS().
*/
/* ---------------------------------------------------------------------- */
tag_typedef_t
nutag_soa_session
=
PTRTAG_TYPEDEF
(
soa_session
);
...
...
libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
浏览文件 @
ca63c019
...
...
@@ -497,16 +497,12 @@ SOFIAPUBFUN char const *nua_substate_name(enum nua_substate substate);
/** Convert string to enum nua_substate. @NEW_1_12_5. */
SOFIAPUBFUN
enum
nua_substate
nua_substate_make
(
char
const
*
sip_substate
);
#define NUTAG_SUB_EXPIRES(x) nutag_sub_expires, tag_uint_v(x)
SOFIAPUBVAR
tag_typedef_t
nutag_sub_expires
;
#define NUTAG_SUB_EXPIRES_REF(x) nutag_sub_expires_ref, tag_uint_vr(&(x))
SOFIAPUBVAR
tag_typedef_t
nutag_sub_expires_ref
;
#define NUTAG_NEWSUB(x) nutag_newsub, tag_bool_v(x)
SOFIAPUBVAR
tag_typedef_t
nutag_newsub
;
#define NUTAG_NEWSUB_REF(x) nutag_newsub_ref, tag_bool_vr(&(x))
SOFIAPUBVAR
tag_typedef_t
nutag_newsub_ref
;
#define NUTAG_REFER_EXPIRES(x) nutag_refer_expires, tag_uint_v((x))
SOFIAPUBVAR
tag_typedef_t
nutag_refer_expires
;
#define NUTAG_REFER_EXPIRES_REF(x) nutag_refer_expires_ref, tag_uint_vr((&(x)))
...
...
@@ -573,13 +569,6 @@ SOFIAPUBVAR tag_typedef_t nutag_detect_network_updates;
nutag_detect_network_updates_ref, tag_int_vr(&(x))
SOFIAPUBVAR
tag_typedef_t
nutag_detect_network_updates_ref
;
#define NUTAG_SHUTDOWN_EVENTS(x) \
nutag_shutdown_events, tag_bool_v(x)
SOFIAPUBVAR
tag_typedef_t
nutag_shutdown_events
;
#define NUTAG_SHUTDOWN_EVENTS_REF(x) \
nutag_shutdown_events_ref, tag_bool_vr(&(x))
SOFIAPUBVAR
tag_typedef_t
nutag_shutdown_events_ref
;
/* Pass nua handle as tagged argument */
#if SU_INLINE_TAG_CAST
su_inline
tag_value_t
nutag_handle_v
(
nua_handle_t
*
v
)
{
return
(
tag_value_t
)
v
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论