diff --git a/app/Classes/Protocol/EMSI.php b/app/Classes/Protocol/EMSI.php index 499a31d..5784511 100644 --- a/app/Classes/Protocol/EMSI.php +++ b/app/Classes/Protocol/EMSI.php @@ -940,10 +940,11 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface if ($ch === 0xff) { Log::debug(sprintf('%s:- TELNET IAC',self::LOGKEY)); + $iaccmd = NULL; // Peek for the next 2 chars do { $iac = $this->client->read(10,1,MSG_PEEK); - $iaccmd = NULL; + Log::debug(sprintf('%s: - IAC LOOP',self::LOGKEY,['iac'=>ord($iac),'cmd'=>$iaccmd)]); switch (ord($iac)) { case 0x00: @@ -994,16 +995,16 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface default: Log::debug(sprintf('%s: - IAC [%02x]',self::LOGKEY,ord($iac))); - $ch = $iac; + $ch = ord($iac); $iac = NULL; } if ($iaccmd) { - $iac = $this->client->read_ch(10); + $iac = ord($this->client->read_ch(10)); $ch = NULL; } elseif (is_null($ch)) { - $ch = $this->client->read_ch(10); + $ch = ord($this->client->read_ch(10)); } } while (! is_null($iac));