Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #95 from N1ck3l/patch-1
Browse files Browse the repository at this point in the history
Update Report.php
  • Loading branch information
adubovikov authored Aug 4, 2016
2 parents b003382 + 7bc1a77 commit b252ada
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/RestApi/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ public function doRTCPServerReport($timestamp, $param, $callids){
$chartData[$ipkey]["packets"] = array();
$chartData[$ipkey]["jitter"] = array();
$chartData[$ipkey]["packets_lost"] = array();
$chartData[$ipkey]["packets"] = array();
$statsData[$ipkey] = array();
$statsData[$ipkey]["mos_counter"] = 0;
$statsData[$ipkey]["mos_average"] = 0;
Expand All @@ -521,7 +520,7 @@ public function doRTCPServerReport($timestamp, $param, $callids){
$statsData[$ipkey]["mos_counter"] += 1;
$statsData[$ipkey]["mos_average"] += $tmpMos;
$statsData[$ipkey]["jitter_avg"] += $block["ia_jitter"];
$statsData[$ipkey]["packets_lost"] += $block["packets_lost"];
$statsData[$ipkey]["packets_lost"] += $block["fraction_lost"]; // packets lost repeats itself each packet. Should be fraction lost instead

if($block["ia_jitter"] > $statsData[$ipkey]["jitter_max"]) $statsData[$ipkey]["jitter_max"] = $block["ia_jitter"];
if(!array_key_exists("mos_worst", $statsData[$ipkey]) || $statsData[$ipkey]["mos_worst"] > $tmpMos) $statsData[$ipkey]["mos_worst"] = $tmpMos;
Expand Down

0 comments on commit b252ada

Please sign in to comment.