From f64727c1e094a89970e82ff6fea4dbb4e0e6c151 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sat, 31 Aug 2024 22:25:58 -0500 Subject: [PATCH] Limit collision_retry to 2 times in icom's frame.c --- rigs/icom/frame.c | 5 ++++- rigs/icom/icom.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index 216f36890..50e962517 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -329,12 +329,15 @@ again2: // https://github.com/Hamlib/Hamlib/issues/1575 // these types of async can interrupt the cmd we sent // if our host number changes must not be for us + collision_retry = 0; if (sendbuf[3] != buf[2]) { rig_debug(RIG_DEBUG_VERBOSE, "%s: unknown async? read again\n", __func__); hl_usleep(100); rig_flush(rp); - goto collision_retry; + collision_retry++; + if (collision_retry < 2) + goto collision_retry; } diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 1a27a7caf..cf712f073 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -35,7 +35,7 @@ #include #endif -#define BACKEND_VER "20240823" +#define BACKEND_VER "20240831" #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)