fixed startup reflector detection on ysf

This commit is contained in:
dg9vh 2017-04-29 18:39:02 +00:00
parent 8ee9e42a24
commit c9d5afac84
2 changed files with 5 additions and 5 deletions

View file

@ -210,7 +210,7 @@ function getYSFGatewayLog() {
// Open Logfile and copy loglines into LogLines-Array() // Open Logfile and copy loglines into LogLines-Array()
$logPath = YSFGATEWAYLOGPATH."/".YSFGATEWAYLOGPREFIX."-".date("Y-m-d").".log"; $logPath = YSFGATEWAYLOGPATH."/".YSFGATEWAYLOGPREFIX."-".date("Y-m-d").".log";
//$logLines = explode("\n", `egrep -h "D:|M:" $logPath`); //$logLines = explode("\n", `egrep -h "D:|M:" $logPath`);
$logLines = explode("\n", `egrep -h "Starting|Disconnect|Connect|Automatic|Disconnecting" $logPath`); $logLines = explode("\n", `egrep -h "repeater|Starting|Disconnect|Connect|Automatic|Disconnecting" $logPath`);
return $logLines; return $logLines;
} }
@ -682,12 +682,12 @@ function getActualLink($logLines, $mode) {
if (strpos($logLine,"Connect to")) { if (strpos($logLine,"Connect to")) {
$to = substr($logLine, 38, 5); $to = substr($logLine, 38, 5);
} }
if (strpos($logLine,"The ID of this repeater is")) {
$to = -1;
}
if (strpos($logLine,"Automatic connection to")) { if (strpos($logLine,"Automatic connection to")) {
$to = substr($logLine, 51, 5); $to = substr($logLine, 51, 5);
} }
if (strpos($logLine,"Starting YSFGateway")) {
$to = -1;
}
if ($to !== "") { if ($to !== "") {
return $to; return $to;
} }

View file

@ -1,3 +1,3 @@
<?php <?php
define("VERSION", "20170428-1 (".getGitVersion().")"); define("VERSION", "20170429-1 (".getGitVersion().")");
?> ?>