More indentiation

This commit is contained in:
phl0 2016-09-20 12:54:02 +02:00
parent fae1bcde9b
commit 15b2adaeab
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A

View file

@ -147,8 +147,8 @@ function getHeardList($logLines, $onlyLast) {
$dstarloss = ""; $dstarloss = "";
$dstarber = ""; $dstarber = "";
$ysfduration = ""; $ysfduration = "";
$ysfloss = ""; $ysfloss = "";
$ysfber = ""; $ysfber = "";
foreach ($logLines as $logLine) { foreach ($logLines as $logLine) {
$duration = ""; $duration = "";
$loss = ""; $loss = "";
@ -391,45 +391,45 @@ function getActualLink($logLines, $mode) {
//M: 2016-04-03 16:16:18.638 DMR Slot 2, received network voice header from 4000 to 2625094 //M: 2016-04-03 16:16:18.638 DMR Slot 2, received network voice header from 4000 to 2625094
//M: 2016-04-03 19:30:03.099 DMR Slot 2, received network voice header from 4020 to 2625094 //M: 2016-04-03 19:30:03.099 DMR Slot 2, received network voice header from 4020 to 2625094
switch ($mode) { switch ($mode) {
case "D-Star": case "D-Star":
if (isProcessRunning(IRCDDBGATEWAY)) { if (isProcessRunning(IRCDDBGATEWAY)) {
return getDSTARLinks(); return getDSTARLinks();
} else { } else {
return "ircddbgateway not running!"; return "ircddbgateway not running!";
} }
break; break;
case "DMR Slot 1": case "DMR Slot 1":
foreach ($logLines as $logLine) { foreach ($logLines as $logLine) {
if(strpos($logLine,"unable to decode the network CSBK")) { if(strpos($logLine,"unable to decode the network CSBK")) {
continue; continue;
} else if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 1") { } else if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 1") {
$to = ""; $to = "";
if (strpos($logLine,"to")) { if (strpos($logLine,"to")) {
$to = trim(substr($logLine, strpos($logLine,"to") + 3)); $to = trim(substr($logLine, strpos($logLine,"to") + 3));
}
if ($to !== "") {
return $to;
}
} }
if ($to !== "") { }
return $to; return "not linked";
break;
case "DMR Slot 2":
foreach ($logLines as $logLine) {
if(strpos($logLine,"unable to decode the network CSBK")) {
continue;
} else if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 2") {
$to = "";
if (strpos($logLine,"to")) {
$to = trim(substr($logLine, strpos($logLine,"to") + 3));
}
if ($to !== "") {
return $to;
}
} }
} }
} return "not linked";
return "not linked"; break;
break;
case "DMR Slot 2":
foreach ($logLines as $logLine) {
if(strpos($logLine,"unable to decode the network CSBK")) {
continue;
} else if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 2") {
$to = "";
if (strpos($logLine,"to")) {
$to = trim(substr($logLine, strpos($logLine,"to") + 3));
}
if ($to !== "") {
return $to;
}
}
}
return "not linked";
break;
} }
return "something went wrong!"; return "something went wrong!";
} }