Fix compile error on last patch

pull/224/head
Michael Black 2020-04-03 08:27:52 -05:00
rodzic 67d09427d3
commit 4f3ff0fc08
2 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -292,6 +292,7 @@ int HAMLIB_API amp_open(AMP *amp)
const struct amp_caps *caps;
struct amp_state *rs;
int status;
int net1,net2,net3,net4,port;
amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@ -311,10 +312,10 @@ int HAMLIB_API amp_open(AMP *amp)
rs->ampport.fd = -1;
// determine if we have a network address
if (sscanf(rs->rotport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5)
if (sscanf(rs->ampport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5)
{
rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->rotport.pathname);
rs->rotport.type.rig = RIG_PORT_NETWORK;
rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->ampport.pathname);
rs->ampport.type.rig = RIG_PORT_NETWORK;
}
switch (rs->ampport.type.rig)

Wyświetl plik

@ -550,6 +550,7 @@ int HAMLIB_API rig_open(RIG *rig)
struct rig_state *rs;
int status = RIG_OK;
value_t parm_value;
int net1,net2,net3,net4,port;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@ -569,10 +570,10 @@ int HAMLIB_API rig_open(RIG *rig)
rs->rigport.fd = -1;
// determine if we have a network address
if (sscanf(rs->rotport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5)
if (sscanf(rs->rigport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5)
{
rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->rotport.pathname);
rs->rotport.type.rig = RIG_PORT_NETWORK;
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)