use ptt port pathname same as rig port pathname when unset and rig is type serial

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2915 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.11
Stéphane Fillod, F8CFE 2010-05-17 22:20:58 +00:00
rodzic cccd274baa
commit 6feb18f611
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -474,6 +474,9 @@ int HAMLIB_API rig_open(RIG *rig)
break;
case RIG_PTT_SERIAL_RTS:
case RIG_PTT_SERIAL_DTR:
if (rs->pttport.pathname[0] == '\0' &&
rs->rigport.type.rig == RIG_PORT_SERIAL)
strcpy(rs->pttport.pathname, rs->rigport.pathname);
rs->pttport.fd = ser_open(&rs->pttport);
if (rs->pttport.fd < 0)
rig_debug(RIG_DEBUG_ERR, "Cannot open PTT device \"%s\"\n",
@ -499,6 +502,9 @@ int HAMLIB_API rig_open(RIG *rig)
case RIG_DCD_SERIAL_DSR:
case RIG_DCD_SERIAL_CTS:
case RIG_DCD_SERIAL_CAR:
if (rs->dcdport.pathname[0] == '\0' &&
rs->rigport.type.rig == RIG_PORT_SERIAL)
strcpy(rs->dcdport.pathname, rs->rigport.pathname);
rs->dcdport.fd = ser_open(&rs->dcdport);
if (rs->dcdport.fd < 0)
rig_debug(RIG_DEBUG_ERR, "Cannot open DCD device \"%s\"\n",