[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 8d0e67f0173d1cd7131c1
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-06-21 15:17:37
|
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, master has been updated via 8d0e67f0173d1cd7131c1235997105204cc48dbd (commit) via 65d922ce536dd0001fc690e7a6a2e59f334f3cb8 (commit) via 0740af61a37f7ae2a350ae2d1c4151c07849b6c3 (commit) from aa39d6a618c82bb0482098fefd2cfddb7bd7ee61 (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 8d0e67f0173d1cd7131c1235997105204cc48dbd 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 diff --git a/tests/rigctld.c b/tests/rigctld.c index a57ab497b..8d2f266c9 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1161,6 +1161,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; @@ -1209,7 +1210,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) { @@ -1250,8 +1251,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 65d922ce536dd0001fc690e7a6a2e59f334f3cb8 Author: George Baltz N3GB <Geo...@gm...> Date: Fri Jun 20 17:36:03 2025 -0400 Add -S to rigctld man page 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 0740af61a37f7ae2a350ae2d1c4151c07849b6c3 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. diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index e551db06d..92872ab98 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: doc/man1/rigctld.1 | 1 + tests/rigctl_parse.c | 5 +++-- tests/rigctld.c | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |