shell: Consume all input data
A transport may receive multiple bytes of data between shell_thread wakeups, but state_collect is only called once per wakeup. So it must process all data, and only return when all data from the transport has been consumed. This is mostly handled correctly, but there were two places where state_collect would return early instead. Signed-off-by: Jim Paris <jim@jtan.com>
This commit is contained in:
parent
d38ffedd4d
commit
38ecf5b41f
1 changed files with 2 additions and 2 deletions
|
@ -882,7 +882,7 @@ static void state_collect(const struct shell *shell)
|
|||
* on received NL.
|
||||
*/
|
||||
state_set(shell, SHELL_STATE_ACTIVE);
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (data) {
|
||||
|
@ -950,7 +950,7 @@ static void state_collect(const struct shell *shell)
|
|||
receive_state_change(shell, SHELL_RECEIVE_DEFAULT);
|
||||
|
||||
if (!flag_echo_get(shell)) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue