kopia lustrzana https://github.com/Hamlib/Hamlib
Honour any error status from serial port calls
The previous commit introduced a regression that masks any error return from opening the serial port used for PTT when that port is different from the CAT serial port.Hamlib-3.0
rodzic
de3fccf033
commit
cf65505511
|
@ -537,17 +537,21 @@ int HAMLIB_API rig_open(RIG *rig)
|
||||||
rs->pttport.pathname);
|
rs->pttport.pathname);
|
||||||
status = -RIG_EIO;
|
status = -RIG_EIO;
|
||||||
}
|
}
|
||||||
if (rs->pttport.type.ptt == RIG_PTT_SERIAL_DTR
|
if (RIG_OK == status
|
||||||
|| rs->pttport.type.ptt == RIG_PTT_SERIAL_RTS)
|
&& (rs->pttport.type.ptt == RIG_PTT_SERIAL_DTR
|
||||||
|
|| rs->pttport.type.ptt == RIG_PTT_SERIAL_RTS))
|
||||||
{
|
{
|
||||||
/* Needed on Linux because the serial port driver sets
|
/* Needed on Linux because the serial port driver sets
|
||||||
RTS/DTR high on open - set both low since we offer no
|
RTS/DTR high on open - set both low since we offer no
|
||||||
control of the non-PTT line and low is better than
|
control of the non-PTT line and low is better than
|
||||||
high */
|
high */
|
||||||
status = ser_set_dtr(&rs->pttport, 0);
|
status = ser_set_dtr(&rs->pttport, 0);
|
||||||
|
if (RIG_OK == status)
|
||||||
|
{
|
||||||
status = ser_set_rts(&rs->pttport, 0);
|
status = ser_set_rts(&rs->pttport, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case RIG_PTT_PARALLEL:
|
case RIG_PTT_PARALLEL:
|
||||||
rs->pttport.fd = par_open(&rs->pttport);
|
rs->pttport.fd = par_open(&rs->pttport);
|
||||||
|
|
Ładowanie…
Reference in New Issue