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
f79dc78c
Commit
f79dc78c
authored
Apr 14, 2016
by
jehan
Browse files
add test for re-invite with 200ok losses
parent
9eacaae8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
tester/call_tester.c
tester/call_tester.c
+18
-2
tester/liblinphone_tester.h
tester/liblinphone_tester.h
+1
-1
tester/multicast_call_tester.c
tester/multicast_call_tester.c
+1
-1
tester/presence_tester.c
tester/presence_tester.c
+1
-1
No files found.
tester/call_tester.c
View file @
f79dc78c
...
...
@@ -1374,7 +1374,7 @@ static void call_with_custom_sdp_attributes(void) {
linphone_core_manager_destroy
(
pauline
);
}
void
call_paused_resumed_base
(
bool_t
multicast
)
{
void
call_paused_resumed_base
(
bool_t
multicast
,
bool_t
with_retransmition
)
{
LinphoneCoreManager
*
marie
=
linphone_core_manager_new
(
"marie_rc"
);
LinphoneCoreManager
*
pauline
=
linphone_core_manager_new
(
transport_supported
(
LinphoneTransportTls
)
?
"pauline_rc"
:
"pauline_tcp_rc"
);
LinphoneCall
*
call_pauline
;
...
...
@@ -1391,8 +1391,18 @@ void call_paused_resumed_base(bool_t multicast) {
wait_for_until
(
pauline
->
lc
,
marie
->
lc
,
NULL
,
5
,
3000
);
if
(
with_retransmition
)
{
sal_set_send_error
(
marie
->
lc
->
sal
,
1500
);
/*to trash 200ok without generating error*/
}
linphone_core_pause_call
(
pauline
->
lc
,
call_pauline
);
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
pauline
->
stat
.
number_of_LinphoneCallPausing
,
1
));
if
(
with_retransmition
)
{
BC_ASSERT_FALSE
(
wait_for_until
(
pauline
->
lc
,
marie
->
lc
,
&
pauline
->
stat
.
number_of_LinphoneCallPaused
,
1
,
1000
));
sal_set_send_error
(
marie
->
lc
->
sal
,
0
);
/*to trash 200ok without generating error*/
}
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphoneCallPausedByRemote
,
1
));
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
pauline
->
stat
.
number_of_LinphoneCallPaused
,
1
));
...
...
@@ -1415,8 +1425,13 @@ end:
linphone_core_manager_destroy
(
marie
);
linphone_core_manager_destroy
(
pauline
);
}
static
void
call_paused_resumed
(
void
)
{
call_paused_resumed_base
(
FALSE
);
call_paused_resumed_base
(
FALSE
,
FALSE
);
}
static
void
call_paused_resumed_with_sip_packets_losses
(
void
)
{
call_paused_resumed_base
(
FALSE
,
TRUE
);
}
static
void
call_paused_by_both
(
void
)
{
...
...
@@ -6181,6 +6196,7 @@ test_t call_tests[] = {
TEST_NO_TAG
(
"Call without SDP"
,
call_with_no_sdp
),
TEST_NO_TAG
(
"Call without SDP and ACK without SDP"
,
call_with_no_sdp_ack_without_sdp
),
TEST_NO_TAG
(
"Call paused resumed"
,
call_paused_resumed
),
TEST_NO_TAG
(
"Call paused resumed with sip packets looses"
,
call_paused_resumed_with_sip_packets_losses
),
#ifdef VIDEO_ENABLED
TEST_NO_TAG
(
"Call paused resumed with video"
,
call_paused_resumed_with_video
),
TEST_NO_TAG
(
"Call paused resumed with video no sdp ack"
,
call_paused_resumed_with_no_sdp_ack
),
...
...
tester/liblinphone_tester.h
View file @
f79dc78c
...
...
@@ -336,7 +336,7 @@ void account_manager_destroy(void);
LinphoneCore
*
configure_lc_from
(
LinphoneCoreVTable
*
v_table
,
const
char
*
path
,
const
char
*
file
,
void
*
user_data
);
void
liblinphone_tester_enable_ipv6
(
bool_t
enabled
);
void
linphone_call_iframe_decoded_cb
(
LinphoneCall
*
call
,
void
*
user_data
);
void
call_paused_resumed_base
(
bool_t
multicast
);
void
call_paused_resumed_base
(
bool_t
multicast
,
bool_t
with_losses
);
void
simple_call_base
(
bool_t
enable_multicast_recv_side
);
void
call_base_with_configfile
(
LinphoneMediaEncryption
mode
,
bool_t
enable_video
,
bool_t
enable_relay
,
LinphoneFirewallPolicy
policy
,
bool_t
enable_tunnel
,
const
char
*
marie_rc
,
const
char
*
pauline_rc
);
void
call_base
(
LinphoneMediaEncryption
mode
,
bool_t
enable_video
,
bool_t
enable_relay
,
LinphoneFirewallPolicy
policy
,
bool_t
enable_tunnel
);
...
...
tester/multicast_call_tester.c
View file @
f79dc78c
...
...
@@ -69,7 +69,7 @@ static void call_multicast(void) {
call_multicast_base
(
FALSE
);
}
static
void
multicast_audio_with_pause_resume
(
void
)
{
call_paused_resumed_base
(
TRUE
);
call_paused_resumed_base
(
TRUE
,
FALSE
);
}
#ifdef VIDEO_ENABLED
static
void
call_multicast_video
(
void
)
{
...
...
tester/presence_tester.c
View file @
f79dc78c
...
...
@@ -183,7 +183,7 @@ static void simple_publish_with_expire(int expires) {
BC_ASSERT_TRUE
(
wait_for
(
marie
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphonePublishOk
,
4
));
linphone_core_manager_destroy
(
marie
);
/*fixme we should wait untill 200ok
*/
BC_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphonePublishCleared
,
2
,
int
,
"%i"
);
/*fixme we should wait untill 200okBC_ASSERT_EQUAL(marie->stat.number_of_LinphonePublishCleared,2,int,"%i");
*/
BC_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphonePublishOk
,
4
,
int
,
"%i"
);
}
...
...
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