kopia lustrzana https://github.com/Hamlib/Hamlib
Fix lack of error for some bad rig numbers. e.g. rigctl -m 228 produced hash collision error instead of unknown rig
https://github.com/Hamlib/Hamlib/issues/735pull/788/head
rodzic
dd6224bc5b
commit
5a2cbdda21
|
@ -284,6 +284,7 @@ int HAMLIB_API rig_check_backend(rig_model_t rig_model)
|
||||||
const struct rig_caps *caps;
|
const struct rig_caps *caps;
|
||||||
int be_idx;
|
int be_idx;
|
||||||
int retval;
|
int retval;
|
||||||
|
int i,n;
|
||||||
|
|
||||||
/* already loaded ? */
|
/* already loaded ? */
|
||||||
caps = rig_get_caps(rig_model);
|
caps = rig_get_caps(rig_model);
|
||||||
|
@ -293,6 +294,17 @@ int HAMLIB_API rig_check_backend(rig_model_t rig_model)
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// hmmm...no caps so did we already load the rigs?
|
||||||
|
for(n=0, i=0; i< RIGLSTHASHSZ; i++)
|
||||||
|
{
|
||||||
|
if (rig_hash_table[i]) ++n;
|
||||||
|
}
|
||||||
|
if (n > 1)
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: rig model %d not found and rig count=%d\n", __func__, rig_model, n);
|
||||||
|
return -RIG_ENAVAIL;
|
||||||
|
}
|
||||||
|
|
||||||
be_idx = rig_lookup_backend(rig_model);
|
be_idx = rig_lookup_backend(rig_model);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Ładowanie…
Reference in New Issue