kopia lustrzana https://github.com/Hamlib/Hamlib
On a 2nd rig_open call it would fail since port was still open.
We now force close the port during rig_open. This should prevent the invalid configuration error WSJT-X sees on rig_openpull/314/head
rodzic
bbc67d598e
commit
3b3c2abb00
15
src/rig.c
15
src/rig.c
|
@ -570,13 +570,6 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
caps = rig->caps;
|
||||
rs = &rig->state;
|
||||
|
||||
if (rs->comm_state)
|
||||
{
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
rs->rigport.fd = -1;
|
||||
|
||||
// determine if we have a network address
|
||||
//
|
||||
is_network |= sscanf(rs->rigport.pathname, "%u.%u.%u.%u:%u", &net1, &net2,
|
||||
|
@ -608,6 +601,14 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
rs->rigport.type.rig = RIG_PORT_NETWORK;
|
||||
}
|
||||
|
||||
if (rs->comm_state)
|
||||
{
|
||||
port_close(&rs->rigport, rs->rigport.type.rig);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
rs->rigport.fd = -1;
|
||||
|
||||
if (rs->rigport.type.rig == RIG_PORT_SERIAL)
|
||||
{
|
||||
if (rs->rigport.parm.serial.rts_state != RIG_SIGNAL_UNSET
|
||||
|
|
Ładowanie…
Reference in New Issue