Fix casting on compressed attributes when value is NULL, reduce some BINKP debugging messages
This commit is contained in:
@@ -306,7 +306,8 @@ final class Binkp extends BaseProtocol
|
||||
Log::debug(sprintf('%s:+ binkp_recv',self::LOGKEY));
|
||||
|
||||
$blksz = $this->rx_size == -1 ? BinkpMessage::BLK_HDR_SIZE : $this->rx_size;
|
||||
Log::debug(sprintf('%s: - binkp_recv blksize [%d] rx_size [%d].',self::LOGKEY,$blksz,$this->rx_size));
|
||||
if ($this->DEBUG)
|
||||
Log::debug(sprintf('%s: - binkp_recv blksize [%d] rx_size [%d].',self::LOGKEY,$blksz,$this->rx_size));
|
||||
|
||||
if ($blksz !== 0) {
|
||||
try {
|
||||
@@ -367,7 +368,8 @@ final class Binkp extends BaseProtocol
|
||||
/* Next block */
|
||||
} else {
|
||||
ZeroLen:
|
||||
Log::debug(sprintf('%s: - binkp_recv NEXT BLOCK, is_msg [%d]',self::LOGKEY,$this->is_msg));
|
||||
if ($this->DEBUG)
|
||||
Log::debug(sprintf('%s: - binkp_recv NEXT BLOCK, is_msg [%d]',self::LOGKEY,$this->is_msg));
|
||||
|
||||
if ($this->is_msg) {
|
||||
$this->mib++;
|
||||
@@ -382,7 +384,8 @@ final class Binkp extends BaseProtocol
|
||||
return 1;
|
||||
}
|
||||
|
||||
Log::debug(sprintf('%s: - binkp_recv BUFFER [%d]',self::LOGKEY,strlen($this->rx_buf)));
|
||||
if ($this->DEBUG)
|
||||
Log::debug(sprintf('%s: - binkp_recv BUFFER [%d]',self::LOGKEY,strlen($this->rx_buf)));
|
||||
|
||||
$rc = ord(substr($this->rx_buf,0,1));
|
||||
|
||||
@@ -477,7 +480,8 @@ final class Binkp extends BaseProtocol
|
||||
$rc = 1;
|
||||
}
|
||||
|
||||
Log::debug(sprintf('%s:= binkp_recv [%d]',self::LOGKEY,$rc));
|
||||
if ($this->DEBUG)
|
||||
Log::debug(sprintf('%s:= binkp_recv [%d]',self::LOGKEY,$rc));
|
||||
|
||||
return $rc;
|
||||
}
|
||||
@@ -487,7 +491,8 @@ final class Binkp extends BaseProtocol
|
||||
*/
|
||||
private function binkp_send(): int
|
||||
{
|
||||
Log::debug(sprintf('%s:+ binkp_send - tx_left [%d]',self::LOGKEY,$this->tx_left));
|
||||
if ($this->DEBUG)
|
||||
Log::debug(sprintf('%s:+ binkp_send - tx_left [%d]',self::LOGKEY,$this->tx_left));
|
||||
|
||||
if ($this->tx_left == 0 ) { /* tx buffer is empty */
|
||||
$this->tx_ptr = $this->tx_left = 0;
|
||||
@@ -561,7 +566,8 @@ final class Binkp extends BaseProtocol
|
||||
}
|
||||
}
|
||||
|
||||
Log::debug(sprintf('%s:= binkp_send [1]',self::LOGKEY));
|
||||
if ($this->DEBUG)
|
||||
Log::debug(sprintf('%s:= binkp_send [1]',self::LOGKEY));
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -595,7 +601,8 @@ final class Binkp extends BaseProtocol
|
||||
*/
|
||||
private function msgs(string $id,string $msg_body): void
|
||||
{
|
||||
Log::debug(sprintf('%s:+ msgs [%d:%s]',self::LOGKEY,$id,$msg_body));
|
||||
if ($this->DEBUG)
|
||||
Log::debug(sprintf('%s:+ msgs [%d:%s]',self::LOGKEY,$id,$msg_body));
|
||||
|
||||
$this->mqueue->push(new BinkpMessage($id,$msg_body));
|
||||
|
||||
|
Reference in New Issue
Block a user