mirror of
https://github.com/systemd/systemd.git
synced 2026-08-12 22:17:19 +00:00
sysupdated: Accept "current+pending" key
Since 594d0345fa the key for
current version might be "current+pending". So in order not to fail
we need to accept it.
Fixes #41409
This commit is contained in:
committed by
Daan De Meyer
parent
fa6d3bffe3
commit
58dc0abcb1
@@ -1334,7 +1334,9 @@ static int target_method_get_version(sd_bus_message *msg, void *userdata, sd_bus
|
||||
|
||||
version_json = sd_json_variant_by_key(v, "current");
|
||||
if (!version_json)
|
||||
return log_sysupdate_bad_json(SYNTHETIC_ERRNO(EPROTO), "list", "Missing key 'current'");
|
||||
version_json = sd_json_variant_by_key(v, "current+pending");
|
||||
if (!version_json)
|
||||
return log_sysupdate_bad_json(SYNTHETIC_ERRNO(EPROTO), "list", "Missing key 'current' or 'current+pending'");
|
||||
|
||||
if (sd_json_variant_is_null(version_json))
|
||||
return sd_bus_reply_method_return(msg, "s", "");
|
||||
|
||||
Reference in New Issue
Block a user