changeset 2463:4fa061bf5e97

* src/common/termiostty.c (termios_lookup): Add missing set of init flag. Pointed out by Rainer Arndt. * src/common/termiostty.c (ecosbaud2posixbaud[]): Add missing B1800 entry.
author asl
date Wed, 30 Jan 2008 18:39:11 +0000
parents 4f79943760f9
children 663ef593022e
files packages/io/serial/current/ChangeLog packages/io/serial/current/src/common/termiostty.c
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/io/serial/current/ChangeLog
+++ b/packages/io/serial/current/ChangeLog
@@ -1,3 +1,14 @@
+2008-01-30  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* src/common/termiostty.c (termios_lookup): Add missing set of
+	init flag. Pointed out by Rainer Arndt.
+
+	
+2008-01-30  Rainer Arndt <Arndt-ADT@kieback-peter.de>
+
+	* src/common/termiostty.c (ecosbaud2posixbaud[]): Add missing
+	B1800 entry.
+
 2006-08-31  Ilija Koco  <ilijak@siva.com.mk>
 	    Andrew Lunn <andrew.lunn@ascom.ch>
 	
--- a/packages/io/serial/current/src/common/termiostty.c
+++ b/packages/io/serial/current/src/common/termiostty.c
@@ -190,7 +190,7 @@ static const cc_t c_cc_init[ NCCS ] = {
 
 // map eCos bitrates to POSIX bitrates.
 static speed_t ecosbaud2posixbaud[] = {
-    0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B2400, B3600,
+    0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, B3600,
     B4800, B7200, B9600, B14400, B19200, B38400, B57600, B115200, B230400 };
 
 // map POSIX bitrates to eCos bitrates.
@@ -580,6 +580,7 @@ termios_lookup(struct cyg_devtab_entry *
     if ( !priv->init ) {
         cyg_drv_mutex_lock( &priv->lock );
         if ( !priv->init ) {  // retest as we may have been pre-empted
+            priv->init = true;
             priv->dev_handle = chan;
             err = real_termios_init( priv );
         }