From 64a2889a7e6c1ff2df90a8d2efa1b5da5247b446 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Tue, 18 Aug 2015 10:50:38 +0200 Subject: [PATCH] Fix IVAO check --- require/class.SBS.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/require/class.SBS.php b/require/class.SBS.php index b03fcaa5..65a27c9e 100644 --- a/require/class.SBS.php +++ b/require/class.SBS.php @@ -51,7 +51,7 @@ static function del() { // Delete old infos foreach (self::$all_flights as $key => $flight) { if (isset($flight['lastupdate'])) { - if ($flight['lastupdate'] < (time()-10000)) { + if ($flight['lastupdate'] < (time()-20000)) { unset(self::$all_flights[$key]); } } @@ -59,7 +59,7 @@ static function del() { } static function add($line) { - global $globalAirportIgnore, $globalFork, $globalDistanceIgnore, $globalDaemon, $globalSBSupdate, $globalDebug; + global $globalAirportIgnore, $globalFork, $globalDistanceIgnore, $globalDaemon, $globalSBSupdate, $globalDebug, $globalIVAO; date_default_timezone_set('UTC'); // signal handler - playing nice with sockets and dump1090 // pcntl_signal_dispatch(); @@ -130,7 +130,7 @@ static function add($line) { } } if (!isset($globalFork)) $globalFork = TRUE; - if (function_exists('pcntl_fork') && $globalFork) { + if (function_exists('pcntl_fork') && $globalFork && !$globalIVAO) { $pids[$id] = pcntl_fork(); if (!$pids[$id]) { $sid = posix_setsid();