Allow device addresses of the form ":19000" to switch from serial to TCP

(not only aaa.bbb.ccc.ddd.port)
pull/224/head
c vw 2020-04-25 17:44:07 +02:00
rodzic 0365450269
commit f6e3570e37
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -581,6 +581,12 @@ int HAMLIB_API rig_open(RIG *rig)
rs->rigport.pathname);
rs->rigport.type.rig = RIG_PORT_NETWORK;
}
if (sscanf(rs->rigport.pathname, ":%d", &port) == 1)
{
rig_debug(RIG_DEBUG_TRACE, "%s: using network address %s\n", __func__,
rs->rigport.pathname);
rs->rigport.type.rig = RIG_PORT_NETWORK;
}
if (rs->rigport.type.rig == RIG_PORT_SERIAL)
{