From 6f486e69d6d94c360a35f80feaf07f1ba489e905 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sat, 5 Feb 2022 23:25:02 -0600 Subject: [PATCH] Add some more copies to port_deprecated structures for rigctl and rigctld --- tests/rigctl.c | 7 +++++++ tests/rigctld.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/tests/rigctl.c b/tests/rigctl.c index 38006ca07..6560469ba 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -203,6 +203,7 @@ int main(int argc, char *argv[]) } rig_file = optarg; + rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_file=%s\n", __func__, rig_file); break; case 'p': @@ -485,6 +486,7 @@ int main(int argc, char *argv[]) if (rig_file) { strncpy(my_rig->state.rigport.pathname, rig_file, HAMLIB_FILPATHLEN - 1); + strncpy(my_rig->state.rigport_deprecated.pathname, rig_file, HAMLIB_FILPATHLEN - 1); } /* @@ -493,27 +495,32 @@ int main(int argc, char *argv[]) if (ptt_type != RIG_PTT_NONE) { my_rig->state.pttport.type.ptt = ptt_type; + my_rig->state.pttport_deprecated.type.ptt = ptt_type; } if (dcd_type != RIG_DCD_NONE) { my_rig->state.dcdport.type.dcd = dcd_type; + my_rig->state.dcdport_deprecated.type.dcd = dcd_type; } if (ptt_file) { strncpy(my_rig->state.pttport.pathname, ptt_file, HAMLIB_FILPATHLEN - 1); + strncpy(my_rig->state.pttport_deprecated.pathname, ptt_file, HAMLIB_FILPATHLEN - 1); } if (dcd_file) { strncpy(my_rig->state.dcdport.pathname, dcd_file, HAMLIB_FILPATHLEN - 1); + strncpy(my_rig->state.dcdport_deprecated.pathname, dcd_file, HAMLIB_FILPATHLEN - 1); } /* FIXME: bound checking and port type == serial */ if (serial_rate != 0) { my_rig->state.rigport.parm.serial.rate = serial_rate; + my_rig->state.rigport_deprecated.parm.serial.rate = serial_rate; } if (civaddr) diff --git a/tests/rigctld.c b/tests/rigctld.c index 3ef0ae54a..3e9b446d2 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -641,27 +641,32 @@ int main(int argc, char *argv[]) if (ptt_type != RIG_PTT_NONE) { my_rig->state.pttport.type.ptt = ptt_type; + my_rig->state.pttport_deprecated.type.ptt = ptt_type; } if (dcd_type != RIG_DCD_NONE) { my_rig->state.dcdport.type.dcd = dcd_type; + my_rig->state.dcdport_deprecated.type.dcd = dcd_type; } if (ptt_file) { strncpy(my_rig->state.pttport.pathname, ptt_file, HAMLIB_FILPATHLEN - 1); + strncpy(my_rig->state.pttport_deprecated.pathname, ptt_file, HAMLIB_FILPATHLEN - 1); } if (dcd_file) { strncpy(my_rig->state.dcdport.pathname, dcd_file, HAMLIB_FILPATHLEN - 1); + strncpy(my_rig->state.dcdport_deprecated.pathname, dcd_file, HAMLIB_FILPATHLEN - 1); } /* FIXME: bound checking and port type == serial */ if (serial_rate != 0) { my_rig->state.rigport.parm.serial.rate = serial_rate; + my_rig->state.rigport_deprecated.parm.serial.rate = serial_rate; } if (civaddr)