]> git.ipfire.org Git - people/ms/telemetry.git/commitdiff
command: Remove return code from success callback
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Jun 2026 15:22:06 +0000 (15:22 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Jun 2026 15:22:06 +0000 (15:22 +0000)
It will always be zero.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/command.c
src/daemon/command.h
src/daemon/sources/hostapd.c
src/daemon/sources/knot-resolver.c
src/daemon/sources/legacy-gateway-latency4.c
src/daemon/sources/suricata.c
src/daemon/sources/unbound.c

index 6c0fab55053196adc9c860fb62e96c2fb6718403..571a828f8803f89339901ff1568328ca9119fa47 100644 (file)
@@ -434,7 +434,7 @@ static int td_command_exited(sd_event_source* source, const siginfo_t* si, void*
                case 0:
                        if (self->callbacks.on_success) {
                                r = self->callbacks.on_success(self->ctx,
-                                       rc, stdout, self->callbacks.on_success_data);
+                                       stdout, self->callbacks.on_success_data);
                        }
                        break;
 
index 0a9a4e9d8af0d85d687eeccbceedc3b40a551b0d..f6bdf46859d3a5ba6818f6a3bcce2463baadff3e 100644 (file)
@@ -29,7 +29,7 @@ typedef struct td_command td_command;
 #include "file.h"
 
 typedef int (*td_command_success_callback)
-       (td_ctx* ctx, int rc, td_file* stdout, void* data);
+       (td_ctx* ctx, td_file* stdout, void* data);
 typedef int (*td_command_failure_callback)
        (td_ctx* ctx, int rc, td_file* stderr, void* data);
 
index cd5c78d302c56058a772b474f30af66567d9eaca..2997c3dd46d6974661d646c3e63b3966445654dc 100644 (file)
@@ -192,8 +192,7 @@ static int hostapd_parse(td_ctx* ctx, td_file* stdout, unsigned long lineno,
        return td_file_parse_line(stdout, parser, line, length);
 }
 
-static int hostapd_on_success(td_ctx* ctx,
-               int rc, td_file* stdout, void* data) {
+static int hostapd_on_success(td_ctx* ctx, td_file* stdout, void* data) {
        td_source* source = data;
        int r;
 
index 933968d0adae19cfff4a6320960ae73b3fc08153..2d67892f2bc5cb0dc45e9bd0ce15110f0ce3d4df 100644 (file)
@@ -159,8 +159,7 @@ static int knot_resolver_parse_metrics(td_ctx* ctx,
        return 0;
 }
 
-static int knot_resolver_on_success(td_ctx* ctx,
-               int rc, td_file* stdout, void* data) {
+static int knot_resolver_on_success(td_ctx* ctx, td_file* stdout, void* data) {
        sd_json_variant* json = NULL;
        td_metrics* metrics = NULL;
        td_source* source = data;
index 947242dec6278b1e4240c939969928f2bc0af7a7..8aecda959e6326ee8f637a7c79b39ab98583a3a0 100644 (file)
@@ -37,7 +37,7 @@
 #include "legacy-gateway-latency4.h"
 
 static int legacy_gateway_latency_on_success(td_ctx* ctx,
-               int rc, td_file* stdout, void* data) {
+               td_file* stdout, void* data) {
        td_source* source = data;
        double stddev = -1.0;
        double min = -1.0;
index 95ccdb8548d8520e99686825444669fe5fb5ac11..3913d65acb7e0c2aa48db80cbaf545ad002a9bcb 100644 (file)
@@ -133,7 +133,7 @@ static int suricata_parse_message(td_ctx* ctx, td_metrics* metrics, sd_json_vari
        return 0;
 }
 
-static int suricata_on_success(td_ctx* ctx, int rc, td_file* stdout, void* data) {
+static int suricata_on_success(td_ctx* ctx, td_file* stdout, void* data) {
        sd_json_variant* json = NULL;
        td_metrics* metrics = NULL;
        td_source* source = data;
index f89861cea33d81b7943519014ec38f1b5f19b741..4cb33ffb5a3cbaf29a50603f7930fb27a2f72f69 100644 (file)
@@ -27,8 +27,7 @@
 #include "../source.h"
 #include "unbound.h"
 
-static int unbound_on_success(td_ctx* ctx,
-               int rc, td_file* stdout, void* data) {
+static int unbound_on_success(td_ctx* ctx, td_file* stdout, void* data) {
        td_source* source = data;
 
        return td_source_parse_metrics(source, NULL, stdout, METRICS(