From d90d3eb0d0651706795e1c7965974f819d0f1ed0 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sun, 10 Oct 2021 08:33:31 -0500 Subject: [PATCH] Use EAGAIN error to retry when serial port is unavailable https://github.com/Hamlib/Hamlib/issues/818 --- src/iofunc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iofunc.c b/src/iofunc.c index 9e27c4298..4114d57ec 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -767,7 +767,7 @@ int HAMLIB_API read_string(hamlib_port_t *p, do { rd_count = port_read(p, &rxbuffer[total_count], 1); - if (errno == EBUSY) + if (errno == EAGAIN) { hl_usleep(5*1000); rig_debug(RIG_DEBUG_WARN, "%s: port_read is busy?\n", __func__);