mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [2/3] incubator-mynewt-core git commit: console; check that console is initialized before trying to output crash data.
Date Mon, 26 Sep 2016 22:21:03 GMT
console; check that console is initialized before trying to output
crash data.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/821dfdc6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/821dfdc6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/821dfdc6

Branch: refs/heads/develop
Commit: 821dfdc66145897641358a2941538ed7268d9843
Parents: b98fe70
Author: Marko Kiiskila <marko@runtime.io>
Authored: Mon Sep 26 14:15:59 2016 -0700
Committer: Marko Kiiskila <marko@runtime.io>
Committed: Mon Sep 26 15:19:32 2016 -0700

----------------------------------------------------------------------
 libs/console/full/src/cons_tty.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/821dfdc6/libs/console/full/src/cons_tty.c
----------------------------------------------------------------------
diff --git a/libs/console/full/src/cons_tty.c b/libs/console/full/src/cons_tty.c
index 0b4fab4..2b5ea97 100644
--- a/libs/console/full/src/cons_tty.c
+++ b/libs/console/full/src/cons_tty.c
@@ -152,9 +152,11 @@ console_blocking_mode(void)
     int sr;
 
     OS_ENTER_CRITICAL(sr);
-    ct->ct_write_char = console_blocking_tx;
+    if (ct->ct_write_char) {
+        ct->ct_write_char = console_blocking_tx;
 
-    console_tx_flush(ct, CONSOLE_TX_BUF_SZ);
+        console_tx_flush(ct, CONSOLE_TX_BUF_SZ);
+    }
     OS_EXIT_CRITICAL(sr);
 }
 
@@ -409,7 +411,7 @@ console_init(console_rx_cb rx_cb)
     }
 
     console_print_prompt();
-    
+
     return 0;
 }
 


Mime
View raw message