From 4ae3519c4ef97d6966122237a5ebc7b7c55583ad Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sat, 27 May 2023 15:13:22 -0500 Subject: [PATCH] Revert "Allow generic_read_string to terminate on expected_len" This reverts commit 00b6e0ecd72104d1c074e78ba3ddb87569ac1e19. --- src/iofunc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iofunc.c b/src/iofunc.c index e0d746cc6..2e37fb227 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -1336,11 +1336,12 @@ static int read_string_generic(hamlib_port_t *p, memset(rxbuffer, 0, rxmax); short timeout_retries = p->timeout_retry; - while ( total_count < expected_len && total_count < rxmax - 1) // allow 1 byte for end-of-string + while (total_count < rxmax - 1) // allow 1 byte for end-of-string { ssize_t rd_count = 0; int result; result = port_wait_for_data(p, direct); + if (result == -RIG_ETIMEOUT) { if (timeout_retries > 0)