Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
sofia-sip
Commits
103d5786
Commit
103d5786
authored
Nov 30, 2005
by
Pekka Pessi
Browse files
Added test for handlin refer subscriptions.
darcs-hash:20051130123208-65a35-e4db384122826e30bddf057d075d4d953e78ee17.gz
parent
e69cfd1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
libsofia-sip-ua/nua/test_nua.c
View file @
103d5786
...
...
@@ -3408,6 +3408,11 @@ int test_session_timer(struct context *ctx)
|-------NOTIFY------>| |
|<------200 OK-------| |
| | |
| | |
|<-----SUBSCRIBE-----| |
|-------200 OK------>| |
| | |
| | |
|-----------------INVITE-------------------->|
| | |
|<------------------180----------------------|
...
...
@@ -3579,6 +3584,58 @@ int test_refer(struct context *ctx)
TEST_1
(
!
e
->
next
);
free_events_in_list
(
ctx
,
b_call
);
if
(
print_headings
)
printf
(
"TEST NUA-9.1.2: PASSED
\n
"
);
/* ---------------------------------------------------------------------- */
/*
A B
|<-----SUBSCRIBE-----|
|-------200 OK------>|
|-------NOTIFY------>| |
|<------200 OK-------| |
*/
if
(
print_headings
)
printf
(
"TEST NUA-9.1.2: extend expiration time for implied subscription
\n
"
);
subscribe
(
b
,
b_call
,
b_call
->
nh
,
SIPTAG_EVENT
(
r_event
),
SIPTAG_EXPIRES_STR
(
"3600"
),
TAG_END
());
run_ab_until
(
ctx
,
-
1
,
save_until_final_response
,
-
1
,
save_until_final_response
);
/*
Events in A:
nua_i_subscribe, nua_r_notify
*/
TEST_1
(
e
=
a_call
->
events
.
head
);
TEST_E
(
e
->
data
->
e_event
,
nua_i_subscribe
);
TEST
(
e
->
data
->
e_status
,
202
);
TEST_1
(
sip
=
sip_object
(
e
->
data
->
e_msg
));
TEST_1
(
sip
->
sip_event
);
TEST_1
(
e
=
e
->
next
);
TEST_E
(
e
->
data
->
e_event
,
nua_r_notify
);
TEST_1
(
!
e
->
next
);
free_events_in_list
(
ctx
,
a_call
);
/*
Events in B after nua_subscribe():
nua_r_subscribe, nua_i_notify
*/
TEST_1
(
e
=
b_call
->
events
.
head
);
TEST_E
(
e
->
data
->
e_event
,
nua_r_subscribe
);
TEST
(
e
->
data
->
e_status
,
202
);
if
(
!
e
->
next
)
run_b_until
(
ctx
,
-
1
,
save_until_received
);
TEST_1
(
e
=
e
->
next
);
TEST_E
(
e
->
data
->
e_event
,
nua_i_notify
);
TEST
(
e
->
data
->
e_status
,
200
);
TEST_1
(
sip
=
sip_object
(
e
->
data
->
e_msg
));
TEST_1
(
sip
->
sip_event
);
TEST_S
(
sip
->
sip_event
->
o_id
,
r_event
->
o_id
);
TEST_1
(
sip
->
sip_subscription_state
);
TEST_S
(
sip
->
sip_subscription_state
->
ss_substate
,
"pending"
);
TEST_1
(
!
e
->
next
);
free_events_in_list
(
ctx
,
b_call
);
if
(
print_headings
)
printf
(
"TEST NUA-9.1.2: PASSED
\n
"
);
...
...
@@ -4124,7 +4181,7 @@ int test_events(struct context *ctx)
nua_subscribe(), nua_r_subscribe
*/
TEST_1
(
e
=
a_call
->
events
.
head
);
TEST_E
(
e
->
data
->
e_event
,
nua_r_subscribe
);
TEST
(
e
->
data
->
e_status
,
501
/* Should be 489?*/
);
TEST
(
e
->
data
->
e_status
,
489
);
TEST_1
(
!
e
->
next
);
#if 0 /* XXX */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment