mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-06-25 17:31:33 +02:00
fix(modem): Fix to allow MSC frame (SIM800 CMUX) after v1.0.2
Fixes the regression from 8edbac69
that added more strict conditions
for CMUX protocol, but didn't allow MSC frames that might be sent during
initializaiton by SIM800.
Closes https://github.com/espressif/esp-protocols/issues/366
This commit is contained in:
@ -144,7 +144,7 @@ bool CMux::data_available(uint8_t *data, size_t len)
|
||||
return false;
|
||||
}
|
||||
} else if ((type & FT_UIH) == FT_UIH && dlci == 0) { // notify the internal DISC command
|
||||
if (len > 0 && (data[0] & 0xE1) == 0xE1) {
|
||||
if ((len > 0 && (data[0] & 0xE1) == 0xE1) || (data == nullptr)) {
|
||||
// Not a DISC, ignore (MSC frame)
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user