mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
* [OSS-Tools] [PATCH microcom 1/2] Handle EOF from port with a better error message
@ 2018-07-04 16:29 Uwe Kleine-König
  2018-07-04 16:29 ` [OSS-Tools] [PATCH microcom 2/2] fix debug printf about WILL/WONT/DO/DONT Uwe Kleine-König
  2018-07-05  7:00 ` [OSS-Tools] [PATCH microcom 1/2] Handle EOF from port with a better error message Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2018-07-04 16:29 UTC (permalink / raw)
  To: oss-tools

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-koenig@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-05  7:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04 16:29 [OSS-Tools] [PATCH microcom 1/2] Handle EOF from port with a better error message Uwe Kleine-König
2018-07-04 16:29 ` [OSS-Tools] [PATCH microcom 2/2] fix debug printf about WILL/WONT/DO/DONT Uwe Kleine-König
2018-07-05  7:00 ` [OSS-Tools] [PATCH microcom 1/2] Handle EOF from port with a better error message Michael Olbrich
2018-07-05  7:41   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox