Browse Source

ckdb - remove unnecessary alert processing

master
kanoi 8 years ago
parent
commit
0cc991eb51
  1. 17
      src/ckdb.php

17
src/ckdb.php

@ -21,7 +21,7 @@ function getsock2($fun, $tmo)
#
function msg($line, $tmo = false)
{
global $fld_sep, $val_sep, $alrts;
global $fld_sep, $val_sep;
$fun = 'stdin';
$ret = false;
@ -34,21 +34,6 @@ function msg($line, $tmo = false)
socket_close($socket);
}
$al = $fld_sep . 'alert' . $val_sep;
if ($ret !== false and strpos($ret, $al) !== false)
{
$all = explode($al, $ret);
$ret = $all[0];
$skip = true;
foreach ($all as $lrt)
{
if ($skip)
$skip = false;
else
// Discard duplicates
$alrts[preg_replace("/[\n\r]*$/",'',$lrt)] = 1;
}
}
return $ret;
}
#

Loading…
Cancel
Save