fix(modem): Fix cmux log message

This commit is contained in:
term-est
2025-03-14 19:56:28 +03:00
committed by David Cermak
parent 1b4baaed0e
commit 6ed672da7b

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: