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:
committed by
Luca Boccassi
parent
c20ee1bfc2
commit
9b899b7938
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user