Skip to content

Commit

Permalink
fix(modem): Fix vfs terminal not to reset read_cb() automatically
Browse files Browse the repository at this point in the history
This change is needed for the fs terminal to work correctly again, after
merging 44bae24 which shifted
responsibility of thread safety from a terminal to the DTE. (Before it
was the terminal, which removed this callback safely when processing completed,
and thus we had to check the callback return value). Not the DTE layers
are responsible for thread safety and the return value indicates
success/failure from processing.
  • Loading branch information
david-cermak committed Sep 20, 2023
1 parent 12bacdc commit 7e17d44
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/esp_modem/src/esp_modem_term_fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ void FdTerminal::task()
} else {
if (FD_ISSET(f.fd, &rfds)) {
if (on_read_priv) {
if (on_read_priv(nullptr, 0)) {
on_read_priv = nullptr;
}
on_read_priv(nullptr, 0);
}
}
}
Expand Down

0 comments on commit 7e17d44

Please sign in to comment.