Skip to content

Commit

Permalink
Incorrect eqLogicId support
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharp38 committed May 6, 2024
1 parent d9d69df commit e15e6b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/php/AbeilleCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ function signalHandler($signal) {
$GLOBALS['zigates'] = [];
$GLOBALS['lastSqn'] = 1;
$eqLogics = eqLogic::byType('Abeille');
cmdLog('debug', "TOTO config=".json_encode($config, JSON_UNESCAPED_SLASHES));
foreach ($eqLogics as $eqLogic) {
$eqLogicId = $eqLogic->getLogicalId();
list($net, $addr) = explode("/", $eqLogicId);
$gtwId = substr($net, 7); // 'AbeilleX' => 'X'
cmdLog('debug', "TOTO ${eqLogicId} gtwId=${gtwId}");
if ($gtwId == '')
continue; // Incorrect case

if ($config['ab::gtwType'.$gtwId] != 'zigate')
continue; // Not a Zigate network
Expand Down
2 changes: 2 additions & 0 deletions core/php/AbeilleParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ function signalHandler($signal) {
$eqLogicId = $eqLogic->getLogicalId();
list($net, $addr) = explode("/", $eqLogicId);
$gtwId = substr($net, 7); // 'AbeilleX' => 'X'
if ($gtwId == '')
continue; // Incorrect case

if ($config['ab::gtwType'.$gtwId] != 'zigate')
continue; // Not a Zigate network
Expand Down

0 comments on commit e15e6b1

Please sign in to comment.