dg9vh 2017-04-28 20:04:49 +00:00
parent f882cbc127
commit b95f9b60bb
2 changed files with 8 additions and 8 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 "Starting|Disconnect|Connect|Automatic|Disconnecting" $logPath`);
return $logLines; return $logLines;
} }
@ -626,6 +626,7 @@ function getActualLink($logLines, $mode) {
//M: 2016-05-02 07:04:10.504 D-Star link status set to "Verlinkt zu DCS002 S" //M: 2016-05-02 07:04:10.504 D-Star link status set to "Verlinkt zu DCS002 S"
//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)) {
@ -672,24 +673,23 @@ function getActualLink($logLines, $mode) {
// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
// 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
// M: 2016-10-01 17:52:36.586 Automatic connection to 62829 // M: 2016-10-01 17:52:36.586 Automatic connection to 62829
if (isProcessRunning("YSFGateway")) { if (isProcessRunning("YSFGateway")) {
foreach($logLines as $logLine) { foreach($logLines as $logLine) {
$to = ""; $to = "";
if (strpos($logLine,"Disconnect has been requested")) {
$to = -1;
}
if (strpos($logLine,"Connect to")) { if (strpos($logLine,"Connect to")) {
$to = substr($logLine, 38, 5); $to = substr($logLine, 38, 5);
} }
if (strpos($logLine,"Automatic connection to")) { if (strpos($logLine,"Automatic connection to")) {
$to = substr($logLine, 51, 5); $to = substr($logLine, 51, 5);
} }
if ($to !== "") {
return $to;
}
if (strpos($logLine,"Starting YSFGateway")) { if (strpos($logLine,"Starting YSFGateway")) {
$to = -1; $to = -1;
} }
if (strpos($logLine,"DISCONNECT Reply")) { if ($to !== "") {
$to = -1; return $to;
} }
} }
return -1; return -1;

View file

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