Skip to content

Commit

Permalink
fix(modem): Fix to allow MSC frame (SIM800 CMUX) after v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Sep 26, 2023
1 parent 4f2ebaa commit 22f1aec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/esp_modem/src/esp_modem_cmux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 22f1aec

Please sign in to comment.