diff --git a/app/Classes/Protocol/EMSI.php b/app/Classes/Protocol/EMSI.php index b213d6d..336c16e 100644 --- a/app/Classes/Protocol/EMSI.php +++ b/app/Classes/Protocol/EMSI.php @@ -953,14 +953,16 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface Log::debug(sprintf('%s: - IAC WILL BINARY [%02x]',self::LOGKEY,ord($iac))); // Config with DO - $this->client->send(chr(0xff).chr(0xfd).$iac,10); + //$this->client->send(chr(0xff).chr(0xfd).$iac,10); } elseif ($iaccmd === 0xfd) { Log::debug(sprintf('%s: - IAC DO BINARY [%02x]',self::LOGKEY,ord($iac))); // Config with WILL - $this->client->send(chr(0xff).chr(0xfb).$iac,10); - $this->client->iac_bin = true; + if ($this->client->iac_bin) { + $this->client->send(chr(0xff).chr(0xfb).$iac,10); + $this->client->iac_bin = true; + } } $iaccmd = NULL; @@ -972,28 +974,31 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface Log::debug(sprintf('%s: - IAC WILL SUPPRESS-GO-AHEAD [%02x]',self::LOGKEY,ord($iac))); // Config with DO - $this->client->send(chr(0xff).chr(0xfd).$iac,10); + //$this->client->send(chr(0xff).chr(0xfd).$iac,10); + } elseif ($iaccmd === 0xfd) { Log::debug(sprintf('%s: - IAC DO SUPPRESS-GO-AHEAD [%02x]',self::LOGKEY,ord($iac))); // Config with WILL $this->client->send(chr(0xff).chr(0xfb).$iac,10); - $this->client->iac_bin = true; } $iaccmd = NULL; break; + // Will case 0xfb: Log::debug(sprintf('%s: - IAC WILL [%02x]',self::LOGKEY,ord($iac))); $iaccmd = ord($iac); break; + // Do case 0xfd: Log::debug(sprintf('%s: - IAC DO [%02x]',self::LOGKEY,ord($iac))); $iaccmd = ord($iac); break; + // IAC case 0xff: Log::debug(sprintf('%s: - IAC [%02x]',self::LOGKEY,ord($iac))); $iaccmd = ord($iac);