Have rig_open return intelligent error message when USB device is requested

pull/1068/head
Mike Black W9MDB 2022-06-04 08:13:19 -05:00
rodzic 0f25083d57
commit fb86c8cf55
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -795,6 +795,13 @@ int HAMLIB_API rig_open(RIG *rig)
rs->rigport.rig = rig;
rs->rigport_deprecated.rig = rig;
if (strcmp(rs->rigport.pathname,"USB")==0)
{
rig_debug(RIG_DEBUG_ERR, "%s: 'USB' is not a valid COM port name\n", __func__);
errno = 2;
RETURNFUNC(-RIG_EINVAL);
}
// rigctl/rigctld may have deprecated values -- backwards compatility
if (rs->rigport_deprecated.pathname[0] != 0)
{