From b609eb0085f4f5f28a94a13b173d38c6784b2af8 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Fri, 20 Oct 2023 16:25:21 -0500 Subject: [PATCH] Make multicast a little quieter so one can run rigctl -vvvvv https://github.com/Hamlib/Hamlib/issues/695 --- simulators/simts590.c | 1 + src/network.c | 2 +- src/snapshot_data.c | 12 ++++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/simulators/simts590.c b/simulators/simts590.c index 303c587a5..7a0cbf80a 100644 --- a/simulators/simts590.c +++ b/simulators/simts590.c @@ -40,6 +40,7 @@ getmyline(int fd, char *buf) int i = 0; memset(buf, 0, BUFSIZE); + hl_usleep(5*1000); while (read(fd, &c, 1) > 0) { buf[i++] = c; diff --git a/src/network.c b/src/network.c index eced1d3f0..d821f3ebf 100644 --- a/src/network.c +++ b/src/network.c @@ -945,7 +945,7 @@ void *multicast_publisher(void *arg) continue; } - rig_debug(RIG_DEBUG_TRACE, "%s: sending rig snapshot data: %s\n", __func__, + rig_debug(RIG_DEBUG_CACHE, "%s: sending rig snapshot data: %s\n", __func__, snapshot_buffer); send_result = sendto( diff --git a/src/snapshot_data.c b/src/snapshot_data.c index b6da46bd0..60bfa63bf 100644 --- a/src/snapshot_data.c +++ b/src/snapshot_data.c @@ -87,7 +87,8 @@ static int snapshot_serialize_rig(cJSON *rig_node, RIG *rig) goto error; } - RETURNFUNC2(RIG_OK); + //RETURNFUNC2(RIG_OK); + return RIG_OK; error: RETURNFUNC2(-RIG_EINTERNAL); @@ -171,7 +172,8 @@ static int snapshot_serialize_vfo(cJSON *vfo_node, RIG *rig, vfo_t vfo) goto error; } - RETURNFUNC2(RIG_OK); + //RETURNFUNC2(RIG_OK); + return RIG_OK; error: RETURNFUNC2(-RIG_EINTERNAL); @@ -298,7 +300,8 @@ static int snapshot_serialize_spectrum(cJSON *spectrum_node, RIG *rig, goto error; } - RETURNFUNC2(RIG_OK); + //RETURNFUNC2(RIG_OK); + return RIG_OK; error: RETURNFUNC2(-RIG_EINTERNAL); @@ -442,7 +445,8 @@ int snapshot_serialize(size_t buffer_length, char *buffer, RIG *rig, rig->state.snapshot_packet_sequence_number++; - RETURNFUNC2(RIG_OK); + //RETURNFUNC2(RIG_OK); + return RIG_OK; error: cJSON_Delete(root_node);