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
7b1e75ec
Commit
7b1e75ec
authored
Nov 29, 2005
by
Pekka Pessi
Browse files
Fixed nua_handle_has_active_call() in nua_stack.c.
darcs-hash:20051129121416-65a35-07dfc813436f3b77a6ba368033f7f5765120c648.gz
parent
1427dd8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
libsofia-sip-ua/nua/nua_stack.c
View file @
7b1e75ec
...
...
@@ -2938,6 +2938,16 @@ static void signal_call_state_change(nua_handle_t *nh,
answer_sent
=
strcasecmp
(
oa_sent
,
"answer"
)
==
0
;
}
if
(
answer_recv
||
answer_sent
)
{
/* Update ss->ss_hold_remote */
char
const
*
held
;
soa_get_params
(
nh
->
nh_soa
,
SOATAG_HOLD_REF
(
held
),
TAG_END
());
ss
->
ss_hold_remote
=
held
&&
strlen
(
held
)
>
0
;
}
(
void
)
sr
;
if
(
next_state
>
ss_state
)
...
...
libsofia-sip-ua/nua/test_nua.c
View file @
7b1e75ec
...
...
@@ -2580,6 +2580,9 @@ int test_call_hold(struct context *ctx)
TEST_1
(
!
e
->
next
);
free_events_in_list
(
ctx
,
a_call
);
TEST_1
(
nua_handle_has_active_call
(
a_call
->
nh
));
TEST_1
(
!
nua_handle_has_call_on_hold
(
a_call
->
nh
));
/*
Server transitions:
INIT -(S1)-> RECEIVED: nua_i_invite, nua_i_state
...
...
@@ -2603,6 +2606,9 @@ int test_call_hold(struct context *ctx)
TEST
(
audio_activity
(
e
->
data
->
e_tags
),
SOA_ACTIVE_SENDRECV
);
TEST_1
(
!
e
->
next
);
TEST_1
(
nua_handle_has_active_call
(
b_call
->
nh
));
TEST_1
(
!
nua_handle_has_call_on_hold
(
b_call
->
nh
));
free_events_in_list
(
ctx
,
b_call
);
/*
...
...
@@ -2635,6 +2641,10 @@ int test_call_hold(struct context *ctx)
TEST_1
(
is_answer_recv
(
e
->
data
->
e_tags
));
TEST
(
audio_activity
(
e
->
data
->
e_tags
),
SOA_ACTIVE_SENDONLY
);
TEST_1
(
!
e
->
next
);
TEST_1
(
nua_handle_has_active_call
(
a_call
->
nh
));
TEST_1
(
nua_handle_has_call_on_hold
(
a_call
->
nh
));
free_events_in_list
(
ctx
,
a_call
);
/*
...
...
@@ -2654,6 +2664,9 @@ int test_call_hold(struct context *ctx)
TEST
(
audio_activity
(
e
->
data
->
e_tags
),
SOA_ACTIVE_RECVONLY
);
TEST_1
(
!
e
->
next
);
TEST_1
(
nua_handle_has_active_call
(
b_call
->
nh
));
TEST_1
(
!
nua_handle_has_call_on_hold
(
b_call
->
nh
));
free_events_in_list
(
ctx
,
b_call
);
if
(
print_headings
)
...
...
@@ -2691,6 +2704,10 @@ int test_call_hold(struct context *ctx)
TEST
(
audio_activity
(
e
->
data
->
e_tags
),
SOA_ACTIVE_INACTIVE
);
TEST
(
video_activity
(
e
->
data
->
e_tags
),
SOA_ACTIVE_SENDRECV
);
TEST_1
(
!
e
->
next
);
TEST_1
(
nua_handle_has_active_call
(
b_call
->
nh
));
TEST_1
(
nua_handle_has_call_on_hold
(
b_call
->
nh
));
free_events_in_list
(
ctx
,
b_call
);
/*
...
...
@@ -2711,6 +2728,9 @@ int test_call_hold(struct context *ctx)
TEST
(
video_activity
(
e
->
data
->
e_tags
),
SOA_ACTIVE_SENDRECV
);
TEST_1
(
!
e
->
next
);
TEST_1
(
nua_handle_has_active_call
(
a_call
->
nh
));
TEST_1
(
nua_handle_has_call_on_hold
(
a_call
->
nh
));
free_events_in_list
(
ctx
,
a_call
);
if
(
print_headings
)
...
...
@@ -2750,6 +2770,9 @@ int test_call_hold(struct context *ctx)
TEST_1
(
!
e
->
next
);
free_events_in_list
(
ctx
,
a_call
);
TEST_1
(
nua_handle_has_active_call
(
a_call
->
nh
));
TEST_1
(
!
nua_handle_has_call_on_hold
(
a_call
->
nh
));
/*
Server transitions:
READY -(S3b)-> COMPLETED: nua_i_invite, <auto-answer>, nua_i_state
...
...
@@ -2768,6 +2791,9 @@ int test_call_hold(struct context *ctx)
TEST
(
video_activity
(
e
->
data
->
e_tags
),
SOA_ACTIVE_SENDRECV
);
TEST_1
(
!
e
->
next
);
TEST_1
(
nua_handle_has_active_call
(
b_call
->
nh
));
TEST_1
(
nua_handle_has_call_on_hold
(
b_call
->
nh
));
free_events_in_list
(
ctx
,
b_call
);
if
(
print_headings
)
...
...
@@ -2807,6 +2833,9 @@ int test_call_hold(struct context *ctx)
TEST_1
(
!
e
->
next
);
free_events_in_list
(
ctx
,
b_call
);
TEST_1
(
nua_handle_has_active_call
(
a_call
->
nh
));
TEST_1
(
!
nua_handle_has_call_on_hold
(
a_call
->
nh
));
/*
Server transitions:
READY -(S3b)-> COMPLETED: nua_i_invite, <auto-answer>, nua_i_state
...
...
@@ -2825,6 +2854,9 @@ int test_call_hold(struct context *ctx)
TEST
(
video_activity
(
e
->
data
->
e_tags
),
SOA_ACTIVE_SENDRECV
);
TEST_1
(
!
e
->
next
);
TEST_1
(
nua_handle_has_active_call
(
b_call
->
nh
));
TEST_1
(
!
nua_handle_has_call_on_hold
(
b_call
->
nh
));
free_events_in_list
(
ctx
,
a_call
);
if
(
print_headings
)
...
...
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