From 6feb18f6115cb4023c525d54ee6464f5b7b92695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Mon, 17 May 2010 22:20:58 +0000 Subject: [PATCH] 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 --- src/rig.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rig.c b/src/rig.c index 421c0083e..ef8cb352e 100644 --- a/src/rig.c +++ b/src/rig.c @@ -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",