Skip to content
Permalink
Browse files

Update mercury.class.php

  • Loading branch information...
directman66 committed Feb 28, 2019
1 parent 72dfe59 commit 5e8cd1c794542377285882745e72104243298357
Showing with 14 additions and 0 deletions.
  1. +14 −0 modules/mercury/mercury.class.php
@@ -478,10 +478,24 @@ function searchdevices(&$out) {
//echo time()-$lastping;
if (time()-$lastping>300) {
$online=ping(processTitle($ip));
$cmd='
$online=ping(processTitle('.$ip.'));
if ($online)
{SQLexec("update mercury_devices set ONLINE="1", LASTPING=".time()." where IP='.$ip.'");}
else
{SQLexec("update mercury_devices set ONLINE="0", LASTPING=".time()." where IP='.$ip.'");}
}
';
SetTimeOut('mercury_devices_ping',$cmd, '10');
/*
if ($online)
{SQLexec("update mercury_devices set ONLINE='1', LASTPING=".time()." where IPADDR='$ip'");}
else
{SQLexec("update mercury_devices set ONLINE='0', LASTPING=".time()." where IPADDR='$ip'");}
*/
}}

0 comments on commit 5e8cd1c

Please sign in to comment.
You can’t perform that action at this time.