diff --git a/src/amplifier.c b/src/amplifier.c index 5bd2c29cb..847aa72a8 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -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) diff --git a/src/rig.c b/src/rig.c index 0859975ac..f206a2189 100644 --- a/src/rig.c +++ b/src/rig.c @@ -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)