This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 868be64 sys/console: Fix RTT input handling with massive output stream
868be64 is described below
commit 868be6498a1ecc0ac26c7ff370d26f71d78f3be5
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Tue Nov 5 12:58:32 2019 +0100
sys/console: Fix RTT input handling with massive output stream
console_handle_char may return negative value in case console
can't be locked. It can happen when a lot of data is being
transmitted out.
If this happened on first negative value returned from
console_handle_char RTT input was disable by not starting
timer for polling again.
This change makes timer active on console_handle_char failure.
---
sys/console/full/src/rtt_console.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/console/full/src/rtt_console.c
b/sys/console/full/src/rtt_console.c
index 45bad85..cfe8c82 100644
--- a/sys/console/full/src/rtt_console.c
+++ b/sys/console/full/src/rtt_console.c
@@ -145,7 +145,7 @@ rtt_console_poll_func(void *arg)
while (key >= 0) {
ret = console_handle_char((char)key);
if (ret < 0) {
- return;
+ break;
}
key = SEGGER_RTT_GetKey();
}