If in the rfc2217 case the socket is closed from the remote end, writing out
"Invalid argument" isn't very helpful.

Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
---
 .travis.yml | 7 -------
 mux.c       | 6 ++++--
 2 files changed, 4 insertions(+), 9 deletions(-)
 delete mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 0723a3a0a433..000000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: c
-compiler: gcc
-dist: trusty
-script:
-  - autoreconf -fi
-  - ./configure
-  - make distcheck
diff --git a/mux.c b/mux.c
index bd36fc73ec6a..341f8803fc50 100644
--- a/mux.c
+++ b/mux.c
@@ -299,8 +299,10 @@ int mux_loop(struct ios_ops *ios)
                        len = read(ios->fd, buf, BUFSIZE);
                        if (len < 0)
                                return -errno;
-                       if (len == 0)
-                               return -EINVAL;
+                       if (len == 0) {
+                               fprintf(stderr, "Got EOF from port\n");
+                               return 0;
+                       }
 
                        handle_receive_buf(ios, buf, len);
                }
-- 
2.18.0


_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de

Reply via email to