From: Michael Tremer Date: Mon, 20 Oct 2025 13:25:37 +0000 (+0000) Subject: file: Only finish parsing when we have found enough fields X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cac4b033e1576721f330e624cf2f275e3fa8e874;p=telemetry.git file: Only finish parsing when we have found enough fields Signed-off-by: Michael Tremer --- diff --git a/src/daemon/file.c b/src/daemon/file.c index 89b0280..4780e73 100644 --- a/src/daemon/file.c +++ b/src/daemon/file.c @@ -263,9 +263,12 @@ static int __td_file_parse(td_ctx* ctx, td_file* self, if (r < 0) return -errno; + // Continue if we could not match all fields + if (r < (int)p->n) + continue; + // If the field could be matched, we return - if (r == 1) - return 0; + return 0; } #pragma GCC diagnostic pop