From a331b59f5f8b64c9b99f7551cbdbaecfcf24ad41 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sat, 9 Jul 2022 23:46:39 -0500 Subject: [PATCH] Fix failure of 2nd rig_init call Issue #735 is still fixed https://github.com/Hamlib/Hamlib/issues/735 https://github.com/Hamlib/Hamlib/issues/1081 --- src/register.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/register.c b/src/register.c index b1173f01c..72c20adcc 100644 --- a/src/register.c +++ b/src/register.c @@ -305,12 +305,14 @@ int HAMLIB_API rig_check_backend(rig_model_t rig_model) if (rig_hash_table[i]) { ++n; } } +#if 0 // this stopped a 2nd rig_init call with a valid model to fail -- reversing if (n > 1) { rig_debug(RIG_DEBUG_ERR, "%s: rig model %u not found and rig count=%d\n", __func__, rig_model, n); return -RIG_ENAVAIL; } +#endif be_idx = rig_lookup_backend(rig_model);