Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
7
Issues
7
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
linphone
Commits
34cce12c
Commit
34cce12c
authored
Jun 18, 2014
by
Gautier Pelloux-Prayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quality reporting: quote adaptive algo data and add unit test for bad formatted reports
parent
26e13f37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
7 deletions
+33
-7
quality_reporting.c
coreapi/quality_reporting.c
+7
-7
quality_reporting_tester.c
tester/quality_reporting_tester.c
+26
-0
No files found.
coreapi/quality_reporting.c
View file @
34cce12c
...
...
@@ -313,12 +313,12 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
if
(
report
->
qos_analyzer
.
timestamp
!=
NULL
){
append_to_buffer
(
&
buffer
,
&
size
,
&
offset
,
"AdaptiveAlg:"
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" NAME=
%s
"
,
report
->
qos_analyzer
.
name
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" TS=
%s
"
,
report
->
qos_analyzer
.
timestamp
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" IN_LEG=
%s
"
,
report
->
qos_analyzer
.
input_leg
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" IN=
%s
"
,
report
->
qos_analyzer
.
input
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" OUT_LEG=
%s
"
,
report
->
qos_analyzer
.
output_leg
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" OUT=
%s
"
,
report
->
qos_analyzer
.
output
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" NAME=
\"
%s
\"
"
,
report
->
qos_analyzer
.
name
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" TS=
\"
%s
\"
"
,
report
->
qos_analyzer
.
timestamp
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" IN_LEG=
\"
%s
\"
"
,
report
->
qos_analyzer
.
input_leg
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" IN=
\"
%s
\"
"
,
report
->
qos_analyzer
.
input
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" OUT_LEG=
\"
%s
\"
"
,
report
->
qos_analyzer
.
output_leg
);
APPEND_IF_NOT_NULL_STR
(
&
buffer
,
&
size
,
&
offset
,
" OUT=
\"
%s
\"
"
,
report
->
qos_analyzer
.
output
);
append_to_buffer
(
&
buffer
,
&
size
,
&
offset
,
"
\r\n
"
);
}
...
...
@@ -641,11 +641,11 @@ reporting_session_report_t * linphone_reporting_new() {
metrics
[
i
]
->
session_description
.
payload_type
=
-
1
;
metrics
[
i
]
->
session_description
.
sample_rate
=
-
1
;
metrics
[
i
]
->
session_description
.
frame_duration
=
-
1
;
metrics
[
i
]
->
session_description
.
packet_loss_concealment
=
-
1
;
metrics
[
i
]
->
packet_loss
.
network_packet_loss_rate
=
-
1
;
metrics
[
i
]
->
packet_loss
.
jitter_buffer_discard_rate
=
-
1
;
metrics
[
i
]
->
session_description
.
packet_loss_concealment
=
-
1
;
metrics
[
i
]
->
jitter_buffer
.
adaptive
=
-
1
;
metrics
[
i
]
->
jitter_buffer
.
abs_max
=
-
1
;
...
...
tester/quality_reporting_tester.c
View file @
34cce12c
...
...
@@ -200,6 +200,31 @@ static void quality_reporting_not_sent_if_low_bandwidth() {
linphone_core_manager_destroy
(
pauline
);
}
void
on_report_send_remove_fields
(
const
LinphoneCall
*
call
,
int
stream_type
,
const
LinphoneContent
*
content
){
char
*
body
=
(
char
*
)
content
->
data
;
/*corrupt start of the report*/
strncpy
(
body
,
"corrupted report is corrupted"
,
strlen
(
"corrupted report is corrupted"
));
}
static
void
quality_reporting_invalid_report
()
{
LinphoneCoreManager
*
marie
=
linphone_core_manager_new
(
"marie_rc"
);
LinphoneCoreManager
*
pauline
=
linphone_core_manager_new
(
"pauline_rc"
);
LinphoneCall
*
call_marie
=
NULL
;
LinphoneCall
*
call_pauline
=
NULL
;
create_call_for_quality_reporting_tests
(
marie
,
pauline
,
&
call_marie
,
&
call_pauline
);
linphone_reporting_set_on_report_send
(
call_marie
,
on_report_send_remove_fields
);
linphone_core_terminate_all_calls
(
marie
->
lc
);
CU_ASSERT_TRUE
(
wait_for
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_LinphonePublishProgress
,
1
));
CU_ASSERT_TRUE
(
wait_for_until
(
marie
->
lc
,
pauline
->
lc
,
&
marie
->
stat
.
number_of_LinphonePublishError
,
1
,
3000
));
CU_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphonePublishOk
,
0
);
linphone_core_manager_destroy
(
marie
);
linphone_core_manager_destroy
(
pauline
);
}
static
void
quality_reporting_at_call_termination
()
{
LinphoneCoreManager
*
marie
=
linphone_core_manager_new
(
"marie_rc"
);
LinphoneCoreManager
*
pauline
=
linphone_core_manager_new
(
"pauline_rc_rtcp_xr"
);
...
...
@@ -296,6 +321,7 @@ test_t quality_reporting_tests[] = {
{
"Not used if no config"
,
quality_reporting_not_used_without_config
},
{
"Call term session report not sent if call did not start"
,
quality_reporting_not_sent_if_call_not_started
},
{
"Call term session report not sent if low bandwidth"
,
quality_reporting_not_sent_if_low_bandwidth
},
{
"Call term session report invalid if missing mandatory fields"
,
quality_reporting_invalid_report
},
{
"Call term session report sent if call ended normally"
,
quality_reporting_at_call_termination
},
{
"Interval report if interval is configured"
,
quality_reporting_interval_report
},
{
"Session report sent if video stopped during call"
,
quality_reporting_session_report_if_video_stopped
},
...
...
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