[Hamlib-commits] Hamlib -- Ham radio control libraries branch Hamlib-4.6.3 updated. 4.6.3-8-gb34695
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-06-21 15:27:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, Hamlib-4.6.3 has been updated via b34695aab8dc7865620676a28ee7bbe7dc67fd3e (commit) via 7127d887833d8c9dbc22ddb46d3ad10c514c41a1 (commit) via 7b8ce52a9ea5bf0e5df18167253e461e429fefcb (commit) via c7cf8593172a03892576268aa7d2124a8af8f740 (commit) from 619cf9fc0d3de8f31fc9d30c8199898c5a91be94 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b34695aab8dc7865620676a28ee7bbe7dc67fd3e Author: Nate Bargmann <n0...@n0...> Date: Sat Jun 21 10:22:50 2025 -0500 Update NEWS for rigctld seperator character fix. diff --git a/NEWS b/NEWS index b8cc0fb05..5e2a8ac30 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,8 @@ Version 4.6.4 such as the TM-D710/TM-V71 that use EOM_TH (\r) as the command terminator. (TNX, Lars Kellogg-Stedman and George Baltz). * Fixed jrc_set_chan. (TNX Mark Fine). + * Fix memory leak in rigctl_parse.c and use unique separator character + for each rigctld connection--closes GitHub #1748. (TNX George Baltz). Version 4.6.3 * 2025-06-10 commit 7127d887833d8c9dbc22ddb46d3ad10c514c41a1 Author: George Baltz N3GB <Geo...@gm...> Date: Sat Jun 21 04:31:31 2025 -0400 Make separator character local to rigctld connection Response to rigctld command was being corrupted by other threads Fixes issue #1748 (cherry picked from commit 8d0e67f0173d1cd7131c1235997105204cc48dbd) diff --git a/tests/rigctld.c b/tests/rigctld.c index c0754acb6..9200feec7 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1251,6 +1251,7 @@ void *handle_socket(void *arg) char serv[NI_MAXSERV]; char send_cmd_term = '\r'; /* send_cmd termination char */ int ext_resp = 0; + char my_resp_sep = resp_sep; // Separator for this connection, initial default rig_powerstat = RIG_POWER_ON; // defaults to power on struct timespec powerstat_check_time; @@ -1299,7 +1300,7 @@ void *handle_socket(void *arg) #else mutex_rigctld(1); retcode = rig_open(my_rig); - mutex_rigctld(1); + mutex_rigctld(0); if (RIG_OK == retcode && verbose > RIG_DEBUG_ERR) { @@ -1340,8 +1341,8 @@ void *handle_socket(void *arg) __func__, handle_data_arg->vfo_mode, handle_data_arg->use_password); retcode = rigctl_parse(handle_data_arg->rig, fsockin, fsockout, NULL, 0, - mutex_rigctld, - 1, 0, &handle_data_arg->vfo_mode, send_cmd_term, &ext_resp, &resp_sep, + mutex_rigctld, 1, 0, &handle_data_arg->vfo_mode, + send_cmd_term, &ext_resp, &my_resp_sep, handle_data_arg->use_password); if (retcode != 0) { rig_debug(RIG_DEBUG_VERBOSE, "%s: rigctl_parse retcode=%d\n", __func__, retcode); } commit 7b8ce52a9ea5bf0e5df18167253e461e429fefcb Author: George Baltz N3GB <Geo...@gm...> Date: Fri Jun 20 17:36:03 2025 -0400 Add -S to rigctld man page (cherry picked from commit 65d922ce536dd0001fc690e7a6a2e59f334f3cb8) diff --git a/doc/man1/rigctld.1 b/doc/man1/rigctld.1 index b8bd84949..2a8847ec2 100644 --- a/doc/man1/rigctld.1 +++ b/doc/man1/rigctld.1 @@ -25,6 +25,7 @@ rigctld \- TCP radio control daemon .OP \-D type .OP \-s baud .OP \-c id +.OP \-S char .OP \-T IPADDR .OP \-t number .OP \-C parm=val commit c7cf8593172a03892576268aa7d2124a8af8f740 Author: George Baltz N3GB <Geo...@gm...> Date: Thu Jun 19 11:34:35 2025 -0400 Fix memory leak in rigctl_parse.c strip_quotes() orphaned 1 or 2 strings per call. (cherry picked from commit 0740af61a37f7ae2a350ae2d1c4151c07849b6c3) diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index b17060fc3..f67d7d179 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -497,9 +497,9 @@ void hash_delete_all() // modifies s to remove quotes -void strip_quotes(char *s) +static void strip_quotes(char *s) { - char *s2 = strdup(s); + char *s2; char *p; if (s[0] != '\"') { return; } // no quotes @@ -510,6 +510,7 @@ void strip_quotes(char *s) if (p) { *p = 0; } strcpy(s, s2); + free(s2); } #ifdef HAVE_LIBREADLINE ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ doc/man1/rigctld.1 | 1 + tests/rigctl_parse.c | 5 +++-- tests/rigctld.c | 7 ++++--- 4 files changed, 10 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |