metrics: lift restrictions on fields types

These checks stem from a rework from strv to a proper varlink object,
but the whole rework's point was to allow more expressive field types,
hence drop the unnecessary verification of the string type.

(cherry picked from commit fc38a61894bcc772b2bc8d56be9700335cdba181)
This commit is contained in:
Lennart Poettering
2026-10-16 17:24:50 +01:00
committed by Luca Boccassi
parent c20ee1bfc2
commit 9b899b7938
+1 -8
View File
@@ -161,14 +161,7 @@ static int metric_build_send(
assert(link);
assert(value);
if (fields) {
assert(sd_json_variant_is_object(fields));
_unused_ const char *k;
_unused_ sd_json_variant *e;
JSON_VARIANT_OBJECT_FOREACH(k, e, fields)
assert(sd_json_variant_is_string(e));
}
assert(!fields || sd_json_variant_is_object(fields));
return sd_varlink_replybo(
link,