You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2017/10/27 16:44:45 UTC

[GitHub] mkiiskila closed pull request #45: Flush the serial port before operation

mkiiskila closed pull request #45: Flush the serial port before operation
URL: https://github.com/apache/mynewt-newtmgr/pull/45
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nmxact/nmserial/serial_xport.go b/nmxact/nmserial/serial_xport.go
index 1d642ee..09a94c0 100644
--- a/nmxact/nmserial/serial_xport.go
+++ b/nmxact/nmserial/serial_xport.go
@@ -81,6 +81,11 @@ func (sx *SerialXport) Start() error {
 		return err
 	}
 
+	err = sx.port.Flush()
+	if err != nil {
+		return err
+	}
+
 	// Most of the reading will be done line by line, use the
 	// bufio.Scanner to do this
 	sx.scanner = bufio.NewScanner(sx.port)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services