Skip to content

Commit

Permalink
Update functions.php
Browse files Browse the repository at this point in the history
A previous change to this code was causing all FCS traffic to show as "TOut", this should resolve that issue while maintaining the new functionality.
  • Loading branch information
AndyTaylorTweet committed Oct 29, 2020
1 parent bd396ac commit 7a13634
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mmdvmhost/functions.php
Expand Up @@ -510,8 +510,14 @@ function getHeardList($logLines) {
if (array_key_exists(3,$lineTokens)) {
$loss = $lineTokens[3];
}
// The change to this code was causing all FCS traffic to always show TOut rather than the timer.
// This version should still show time-out when needed, AND show the time if it exists.
if (strpos($logLine,"RF user has timed out") || strpos($logLine,"watchdog has expired")) {
$duration = "TOut";
if (array_key_exists(2,$lineTokens) && strpos($lineTokens[2], "seconds")) {
$duration = strtok($lineTokens[2], " ");
} else {
$duration = "TOut";
}
$ber = "??%";
}

Expand Down

1 comment on commit 7a13634

@thovoigt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
many thanks for changing this piece of code. I've already tested a similiar one here locally but haven't committed ist yet.
Yes, it will work also with DMR.

Please sign in to comment.