Limit collision_retry to 2 times in icom's frame.c

pull/1608/head
Mike Black W9MDB 2024-08-31 22:25:58 -05:00
rodzic 7e35ffac8d
commit f64727c1e0
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -329,12 +329,15 @@ again2:
// https://github.com/Hamlib/Hamlib/issues/1575 // https://github.com/Hamlib/Hamlib/issues/1575
// these types of async can interrupt the cmd we sent // these types of async can interrupt the cmd we sent
// if our host number changes must not be for us // if our host number changes must not be for us
collision_retry = 0;
if (sendbuf[3] != buf[2]) if (sendbuf[3] != buf[2])
{ {
rig_debug(RIG_DEBUG_VERBOSE, "%s: unknown async? read again\n", __func__); rig_debug(RIG_DEBUG_VERBOSE, "%s: unknown async? read again\n", __func__);
hl_usleep(100); hl_usleep(100);
rig_flush(rp); rig_flush(rp);
goto collision_retry; collision_retry++;
if (collision_retry < 2)
goto collision_retry;
} }

Wyświetl plik

@ -35,7 +35,7 @@
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#define BACKEND_VER "20240823" #define BACKEND_VER "20240831"
#define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31)
#define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)