[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 9123d08a6c95a59214a01
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: n0nb <n0...@us...> - 2025-09-01 00:35:24
|
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 9123d08a6c95a59214a01da6551fd9c887939ce8 (commit)
via 341a5201c6748bf17f0caa003fce2a7b87530bc2 (commit)
via 8f343197e0926ca422c3b6aeb66b39b1b43c6a6b (commit)
from 43b84ee56a66c19844c5efcb63f1217f57fac4c2 (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 9123d08a6c95a59214a01da6551fd9c887939ce8
Merge: 43b84ee56 341a5201c
Author: Nate Bargmann <n0...@n0...>
Date: Sun Aug 31 19:21:27 2025 -0500
Merge GitHub PR #1874
commit 341a5201c6748bf17f0caa003fce2a7b87530bc2
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Fri Aug 29 23:04:00 2025 +0200
Replace literal constant with defined symbol
diff --git a/src/misc.c b/src/misc.c
index 2156d0b7b..d363f0f1b 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -2131,14 +2131,14 @@ int HAMLIB_API parse_hoststr(char *hoststr, int hoststr_len, char host[256],
// Exclude any names that aren't a host:port format
// Handle device names 1st
- if (strstr(hoststr, "/dev")) { return -1; }
+ if (strstr(hoststr, "/dev")) { return -RIG_EINVAL; }
- if (strstr(hoststr, "/")) { return -1; } // probably a path so not a hoststr
+ if (strstr(hoststr, "/")) { return -RIG_EINVAL; } // probably a path so not a hoststr
- if (strncasecmp(hoststr, "com", 3) == 0) { return -1; }
+ if (strncasecmp(hoststr, "com", 3) == 0) { return -RIG_EINVAL; }
// escaped COM port like \\.\COM3 or \.\COM3
- if (strstr(hoststr, "\\.\\")) { return -1; }
+ if (strstr(hoststr, "\\.\\")) { return -RIG_EINVAL; }
// Now let's try and parse a host:port thing
// bracketed IPV6 with optional port
@@ -2235,7 +2235,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, int hoststr_len, char host[256],
rig_debug(RIG_DEBUG_BUG, "%s: Unhandled host=%s\n", __func__, hoststr);
- return -1;
+ return -RIG_EINVAL;
}
commit 8f343197e0926ca422c3b6aeb66b39b1b43c6a6b
Author: Daniele Forsi IU5HKX <iu...@gm...>
Date: Thu Aug 28 19:51:51 2025 +0200
Replace a printf() with rig_debug()
The bug is that we don't know why the string is invalid.
Test case:
before
tests/rigctl -r "invalid:123:port" -m 2
Unhandled host=invalid:123:port
Unhandled host=invalid:123:port
after:
tests/rigctl -r "invalid:123:port" -m 2
(no output)
tests/rigctl -r "invalid:123:port" -m 2 -v
parse_hoststr: Unhandled host=invalid:123:port
parse_hoststr: Unhandled host=invalid:123:port
diff --git a/src/misc.c b/src/misc.c
index c87f9b3b0..2156d0b7b 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -2233,7 +2233,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, int hoststr_len, char host[256],
if (n >= 1 && strlen(dummy) == 0) { return RIG_OK; }
- printf("Unhandled host=%s\n", hoststr);
+ rig_debug(RIG_DEBUG_BUG, "%s: Unhandled host=%s\n", __func__, hoststr);
return -1;
}
-----------------------------------------------------------------------
Summary of changes:
src/misc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
hooks/post-receive
--
Hamlib -- Ham radio control libraries
|