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
liblinphone
Commits
2a4b3bd7
Commit
2a4b3bd7
authored
Dec 14, 2020
by
Andrea Gianarda
Browse files
Improve reliability of audio video conference suite
Do not use UDP managers for ICE tests
parent
e028c77f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
56 deletions
+69
-56
tester/audio_video_conference_tester.c
tester/audio_video_conference_tester.c
+26
-24
tester/tester.c
tester/tester.c
+43
-32
No files found.
tester/audio_video_conference_tester.c
View file @
2a4b3bd7
...
...
@@ -2994,8 +2994,10 @@ static void take_calls_to_callee(bctbx_list_t* lcs, bctbx_list_t* caller, Linpho
LinphoneCall
*
callee_call
=
linphone_core_get_call_by_remote_address2
(
callee
->
lc
,
caller_uri
);
BC_ASSERT_PTR_NOT_NULL
(
callee_call
);
// Take call - ringing ends
linphone_call_accept
(
callee_call
);
if
(
callee_call
)
{
// Take call - ringing ends
linphone_call_accept
(
callee_call
);
}
}
unsigned
int
no_callers
=
(
unsigned
int
)
bctbx_list_size
(
caller
);
...
...
@@ -3022,7 +3024,7 @@ static void take_calls_to_callee(bctbx_list_t* lcs, bctbx_list_t* caller, Linpho
LinphoneCall
*
current_callee_call
=
linphone_core_get_current_call
(
callee
->
lc
);
if
(
callee_call
==
current_callee_call
)
{
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneCallStreamsRunning
,
2
,
5000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
callee
->
stat
.
number_of_LinphoneCallStreamsRunning
,
initial_callee_stat
.
number_of_LinphoneCallStreamsRunning
+
1
,
5000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
callee
->
stat
.
number_of_LinphoneCallStreamsRunning
,
initial_callee_stat
.
number_of_LinphoneCallStreamsRunning
+
no_callers
+
1
,
5000
));
}
else
{
call_checked_cnt
++
;
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneCallPausedByRemote
,
2
,
5000
));
...
...
@@ -3158,15 +3160,15 @@ static void conference_with_calls_queued_with_ice(void) {
}
// ICE is enabled
LinphoneCoreManager
*
michell
e
=
create_mgr_for_conference
(
"
michelle_rc_udp
"
,
TRUE
);
linphone_core_set_inc_timeout
(
michell
e
->
lc
,
10000
);
if
(
linphone_core_media_encryption_supported
(
michell
e
->
lc
,
mode
))
{
linphone_core_set_firewall_policy
(
michell
e
->
lc
,
LinphonePolicyUseIce
);
linphone_core_set_media_encryption
(
michell
e
->
lc
,
mode
);
LinphoneCoreManager
*
chlo
e
=
create_mgr_for_conference
(
"
chloe_rc
"
,
TRUE
);
linphone_core_set_inc_timeout
(
chlo
e
->
lc
,
10000
);
if
(
linphone_core_media_encryption_supported
(
chlo
e
->
lc
,
mode
))
{
linphone_core_set_firewall_policy
(
chlo
e
->
lc
,
LinphonePolicyUseIce
);
linphone_core_set_media_encryption
(
chlo
e
->
lc
,
mode
);
}
bctbx_list_t
*
participants
=
NULL
;
participants
=
bctbx_list_append
(
participants
,
michell
e
);
participants
=
bctbx_list_append
(
participants
,
chlo
e
);
participants
=
bctbx_list_append
(
participants
,
pauline
);
participants
=
bctbx_list_append
(
participants
,
laure
);
...
...
@@ -3177,7 +3179,7 @@ static void conference_with_calls_queued_with_ice(void) {
destroy_mgr_in_conference
(
marie
);
destroy_mgr_in_conference
(
pauline
);
destroy_mgr_in_conference
(
laure
);
destroy_mgr_in_conference
(
michell
e
);
destroy_mgr_in_conference
(
chlo
e
);
}
static
void
conference_with_back_to_back_call_accept_without_ice
(
void
)
{
...
...
@@ -3238,15 +3240,15 @@ static void conference_with_back_to_back_call_accept_with_ice(void) {
}
// ICE is enabled
LinphoneCoreManager
*
michell
e
=
create_mgr_for_conference
(
"
michelle_rc_udp
"
,
TRUE
);
linphone_core_set_inc_timeout
(
michell
e
->
lc
,
10000
);
if
(
linphone_core_media_encryption_supported
(
michell
e
->
lc
,
mode
))
{
linphone_core_set_firewall_policy
(
michell
e
->
lc
,
LinphonePolicyUseIce
);
linphone_core_set_media_encryption
(
michell
e
->
lc
,
mode
);
LinphoneCoreManager
*
chlo
e
=
create_mgr_for_conference
(
"
chloe_rc
"
,
TRUE
);
linphone_core_set_inc_timeout
(
chlo
e
->
lc
,
10000
);
if
(
linphone_core_media_encryption_supported
(
chlo
e
->
lc
,
mode
))
{
linphone_core_set_firewall_policy
(
chlo
e
->
lc
,
LinphonePolicyUseIce
);
linphone_core_set_media_encryption
(
chlo
e
->
lc
,
mode
);
}
bctbx_list_t
*
participants
=
NULL
;
participants
=
bctbx_list_append
(
participants
,
michell
e
);
participants
=
bctbx_list_append
(
participants
,
chlo
e
);
participants
=
bctbx_list_append
(
participants
,
pauline
);
participants
=
bctbx_list_append
(
participants
,
laure
);
...
...
@@ -3257,7 +3259,7 @@ static void conference_with_back_to_back_call_accept_with_ice(void) {
destroy_mgr_in_conference
(
marie
);
destroy_mgr_in_conference
(
pauline
);
destroy_mgr_in_conference
(
laure
);
destroy_mgr_in_conference
(
michell
e
);
destroy_mgr_in_conference
(
chlo
e
);
}
static
void
conference_with_back_to_back_call_invite_accept_without_ice
(
void
)
{
...
...
@@ -3318,15 +3320,15 @@ static void conference_with_back_to_back_call_invite_accept_with_ice(void) {
}
// ICE is enabled
LinphoneCoreManager
*
michell
e
=
create_mgr_for_conference
(
"
michelle_rc_udp
"
,
TRUE
);
linphone_core_set_inc_timeout
(
michell
e
->
lc
,
10000
);
if
(
linphone_core_media_encryption_supported
(
michell
e
->
lc
,
mode
))
{
linphone_core_set_firewall_policy
(
michell
e
->
lc
,
LinphonePolicyUseIce
);
linphone_core_set_media_encryption
(
michell
e
->
lc
,
mode
);
LinphoneCoreManager
*
chlo
e
=
create_mgr_for_conference
(
"
chloe_rc
"
,
TRUE
);
linphone_core_set_inc_timeout
(
chlo
e
->
lc
,
10000
);
if
(
linphone_core_media_encryption_supported
(
chlo
e
->
lc
,
mode
))
{
linphone_core_set_firewall_policy
(
chlo
e
->
lc
,
LinphonePolicyUseIce
);
linphone_core_set_media_encryption
(
chlo
e
->
lc
,
mode
);
}
bctbx_list_t
*
participants
=
NULL
;
participants
=
bctbx_list_append
(
participants
,
michell
e
);
participants
=
bctbx_list_append
(
participants
,
chlo
e
);
participants
=
bctbx_list_append
(
participants
,
pauline
);
participants
=
bctbx_list_append
(
participants
,
laure
);
...
...
@@ -3337,7 +3339,7 @@ static void conference_with_back_to_back_call_invite_accept_with_ice(void) {
destroy_mgr_in_conference
(
marie
);
destroy_mgr_in_conference
(
pauline
);
destroy_mgr_in_conference
(
laure
);
destroy_mgr_in_conference
(
michell
e
);
destroy_mgr_in_conference
(
chlo
e
);
}
static
void
back_to_back_conferences
(
void
)
{
...
...
tester/tester.c
View file @
2a4b3bd7
...
...
@@ -682,9 +682,11 @@ static void check_participant_added_to_conference(bctbx_list_t *lcs, LinphoneCor
// Check that me has focus attribute set to true
BC_ASSERT_PTR_NOT_NULL
(
conference
);
LinphoneParticipant
*
me
=
linphone_conference_get_me
(
conference
);
BC_ASSERT_PTR_NOT_NULL
(
me
);
BC_ASSERT_TRUE
(
linphone_participant_is_focus
(
me
));
if
(
conference
)
{
LinphoneParticipant
*
me
=
linphone_conference_get_me
(
conference
);
BC_ASSERT_PTR_NOT_NULL
(
me
);
BC_ASSERT_TRUE
(
linphone_participant_is_focus
(
me
));
}
int
*
notifyExpected
=
NULL
;
for
(
int
idx
=
0
;
idx
<
no_participants
;
idx
++
)
{
...
...
@@ -889,33 +891,40 @@ LinphoneStatus add_calls_to_local_conference(bctbx_list_t *lcs, LinphoneCoreMana
for
(
bctbx_list_t
*
it
=
new_participants
;
it
;
it
=
bctbx_list_next
(
it
))
{
LinphoneCoreManager
*
m
=
(
LinphoneCoreManager
*
)
bctbx_list_get_data
(
it
);
stats
initial_stats
=
m
->
stat
;
LinphoneCall
*
participant_call
=
linphone_core_get_current_call
(
m
->
lc
);
LinphoneCall
*
conf_call
=
linphone_core_get_call_by_remote_address2
(
conf_mgr
->
lc
,
m
->
identity
);
bool_t
is_call_paused
=
(
linphone_call_get_state
(
conf_call
)
==
LinphoneCallStatePaused
);
BC_ASSERT_PTR_NOT_NULL
(
conf_call
);
call_paused
=
(
bool_t
*
)
realloc
(
call_paused
,
counter
*
sizeof
(
bool_t
));
call_paused
[
counter
-
1
]
=
is_call_paused
;
if
(
conference
)
{
linphone_conference_add_participant
(
conference
,
conf_call
);
conference_used
=
conference
;
}
else
{
linphone_core_add_to_conference
(
conf_mgr
->
lc
,
conf_call
);
conference_used
=
linphone_core_get_conference
(
conf_mgr
->
lc
);
}
call_paused
[
counter
-
1
]
=
FALSE
;
if
(
conf_call
)
{
bool_t
is_call_paused
=
(
linphone_call_get_state
(
conf_call
)
==
LinphoneCallStatePaused
);
call_paused
[
counter
-
1
]
=
is_call_paused
;
if
(
conference
)
{
linphone_conference_add_participant
(
conference
,
conf_call
);
conference_used
=
conference
;
}
else
{
linphone_core_add_to_conference
(
conf_mgr
->
lc
,
conf_call
);
conference_used
=
linphone_core_get_conference
(
conf_mgr
->
lc
);
}
if
(
is_call_paused
)
{
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneCallResuming
,
conf_initial_stats
.
number_of_LinphoneCallResuming
+
1
,
2000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneCallStreamsRunning
,
initial_stats
.
number_of_LinphoneCallStreamsRunning
+
1
,
3000
));
}
else
{
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneCallUpdating
,
conf_initial_stats
.
number_of_LinphoneCallUpdating
+
1
,
5000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneCallUpdatedByRemote
,(
initial_stats
.
number_of_LinphoneCallUpdatedByRemote
+
1
),
5000
));
}
if
(
is_call_paused
)
{
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneCallResuming
,
conf_initial_stats
.
number_of_LinphoneCallResuming
+
1
,
2000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneCallStreamsRunning
,
initial_stats
.
number_of_LinphoneCallStreamsRunning
+
1
,
3000
));
}
else
{
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneCallUpdating
,
conf_initial_stats
.
number_of_LinphoneCallUpdating
+
1
,
5000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneCallUpdatedByRemote
,(
initial_stats
.
number_of_LinphoneCallUpdatedByRemote
+
1
),
5000
));
}
// Local conference
BC_ASSERT_TRUE
(
linphone_call_is_in_conference
(
conf_call
));
// Local conference
BC_ASSERT_TRUE
(
linphone_call_is_in_conference
(
conf_call
));
}
// Remote conference
BC_ASSERT_PTR_NOT_NULL
(
linphone_call_get_conference
(
participant_call
));
BC_ASSERT_FALSE
(
linphone_call_is_in_conference
(
participant_call
));
LinphoneCall
*
participant_call
=
linphone_core_get_current_call
(
m
->
lc
);
BC_ASSERT_PTR_NOT_NULL
(
participant_call
);
if
(
participant_call
)
{
BC_ASSERT_PTR_NOT_NULL
(
linphone_call_get_conference
(
participant_call
));
BC_ASSERT_FALSE
(
linphone_call_is_in_conference
(
participant_call
));
}
counter
++
;
}
...
...
@@ -1244,15 +1253,17 @@ LinphoneStatus terminate_conference(bctbx_list_t *participants, LinphoneCoreMana
conferenceToDestroy
=
linphone_core_get_conference
(
conf_mgr
->
lc
);
}
BC_ASSERT_PTR_NOT_NULL
(
conferenceToDestroy
);
unsigned
int
no_participants
=
linphone_conference_get_participant_count
(
conferenceToDestroy
);
if
(
conferenceToDestroy
)
{
bool_t
core_held_conference
=
(
conferenceToDestroy
==
linphone_core_get_conference
(
conf_mgr
->
lc
));
linphone_conference_terminate
(
conferenceToDestroy
);
if
(
focus_mgr
)
{
finish_terminate_remote_conference
(
lcs
,
lcm_stats
,
conf_mgr
,
focus_mgr
,
no_participants
,
core_held_conference
);
}
else
{
finish_terminate_local_conference
(
lcs
,
lcm_stats
,
conf_mgr
,
no_participants
,
core_held_conference
);
unsigned
int
no_participants
=
linphone_conference_get_participant_count
(
conferenceToDestroy
);
if
(
conferenceToDestroy
)
{
bool_t
core_held_conference
=
(
conferenceToDestroy
==
linphone_core_get_conference
(
conf_mgr
->
lc
));
linphone_conference_terminate
(
conferenceToDestroy
);
if
(
focus_mgr
)
{
finish_terminate_remote_conference
(
lcs
,
lcm_stats
,
conf_mgr
,
focus_mgr
,
no_participants
,
core_held_conference
);
}
else
{
finish_terminate_local_conference
(
lcs
,
lcm_stats
,
conf_mgr
,
no_participants
,
core_held_conference
);
}
}
}
...
...
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