You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by vi...@apache.org on 2018/05/24 01:48:52 UTC
[mynewt-core] branch master updated: uart_console:
console_queue_char() should chk if device is open (#1130)
This is an automated email from the ASF dual-hosted git repository.
vipulrahane 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 6a7d515 uart_console: console_queue_char() should chk if device is open (#1130)
6a7d515 is described below
commit 6a7d51534f16fbf19120107fb3b5305c101897c3
Author: Vipul Rahane <vr...@gmail.com>
AuthorDate: Wed May 23 18:48:49 2018 -0700
uart_console: console_queue_char() should chk if device is open (#1130)
---
sys/console/full/src/uart_console.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/console/full/src/uart_console.c b/sys/console/full/src/uart_console.c
index 31a462b..05c6c72 100644
--- a/sys/console/full/src/uart_console.c
+++ b/sys/console/full/src/uart_console.c
@@ -89,6 +89,10 @@ console_queue_char(struct uart_dev *uart_dev, uint8_t ch)
{
int sr;
+ if ((uart_dev->ud_dev->od_flags & OS_DEV_F_STATUS_OPEN) == 0) {
+ return;
+ }
+
OS_ENTER_CRITICAL(sr);
while (console_ring_is_full(&cr_tx)) {
/* TX needs to drain */
--
To stop receiving notification emails like this one, please contact
vipulrahane@apache.org.