check not linked in YSFReflector link

This commit is contained in:
dg9vh 2016-09-25 16:36:48 +00:00
parent ac257a6c4c
commit a2aace3f31
2 changed files with 11 additions and 5 deletions

View file

@ -448,7 +448,9 @@ function getActualLink($logLines, $mode) {
// M: 2016-09-25 16:08:05.811 Connect to 62829 has been requested by DG9VH // M: 2016-09-25 16:08:05.811 Connect to 62829 has been requested by DG9VH
foreach($logLines as $logLine) { foreach($logLines as $logLine) {
$to = ""; $to = "";
if (strpos($logLine,"Connect to")) { if (strpos($logLine,"Starting YSFGateway")) {
$to = -1;
}if (strpos($logLine,"Connect to")) {
$to = substr($logLine, 47, 5); $to = substr($logLine, 47, 5);
} }
if ($to !== "") { if ($to !== "") {
@ -522,12 +524,16 @@ function getActiveYSFReflectors($logLines) {
} }
function getYSFReflectorById($id, $reflectors) { function getYSFReflectorById($id, $reflectors) {
if ($id ==-1) {
return "not linked";
} else {
foreach($reflectors as $reflector) { foreach($reflectors as $reflector) {
if ($reflector[2] === $id) { if ($reflector[2] === $id) {
return $reflector[0]; return $reflector[0];
} }
} }
} }
}
function getName($callsign) { function getName($callsign) {
if (is_numeric($callsign)) { if (is_numeric($callsign)) {

View file

@ -1,3 +1,3 @@
<?php <?php
define("VERSION", "20160925-1"); define("VERSION", "20160925-2");
?> ?>