Merge pull request #790 from david-cermak/fix/modem_cmux_log_pr

[modem]: Fix cmux log message
This commit is contained in:
david-cermak
2025-03-28 08:51:37 +01:00
committed by GitHub

View File

@ -248,7 +248,7 @@ bool CMux::on_header(CMuxFrame &frame)
// Sanity check for expected values of DLCI and type,
// since CRC could be evaluated after the frame payload gets received
if (dlci > MAX_TERMINALS_NUM || (frame_header[1] & 0x01) == 0 ||
(((type & FT_UIH) != FT_UIH) && type != (FT_UA | PF) ) ) {
(((type & FT_UIH) != FT_UIH) && type != (FT_UA | PF))) {
recover_protocol(protocol_mismatch_reason::UNEXPECTED_HEADER);
return true;
}
@ -327,7 +327,7 @@ bool CMux::on_cmux_data(uint8_t *data, size_t actual_len)
auto data_end = buffer.get() + buffer.size;
data_to_read = payload_len + 2; // 2 -- CMUX protocol footer
if (data + data_to_read >= data_end) {
ESP_LOGW("CUMX", "Failed to defragment longer payload (payload=%" PRIsize_t ")", payload_len);
ESP_LOGW("CMUX", "Failed to defragment longer payload (payload=%" PRIsize_t ")", payload_len);
// If you experience this error, your device uses longer payloads while
// the configured buffer is too small to defragment the payload properly.
// To resolve this issue you can: