mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
dbus: return non-zero return value in the case that prefix won't match
strv_extend returns 0 in the case of success which means that else if (bus_track_deserialize_item(&m->deserialized_subscribed, l) == 0) log_warning("Unknown serialization item '%s'", l); will be printed when value is added correctly.
This commit is contained in:
parent
58f10d401f
commit
f44b9efcec
@ -1180,7 +1180,7 @@ int bus_track_deserialize_item(char ***l, const char *line) {
|
||||
|
||||
e = startswith(line, "subscribed=");
|
||||
if (!e)
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
|
||||
return strv_extend(l, e);
|
||||
}
|
||||
|
@ -2408,7 +2408,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
||||
m->kdbus_fd = fdset_remove(fds, fd);
|
||||
}
|
||||
|
||||
} else if (bus_track_deserialize_item(&m->deserialized_subscribed, l) == 0)
|
||||
} else if (bus_track_deserialize_item(&m->deserialized_subscribed, l) < 0)
|
||||
log_warning("Unknown serialization item '%s'", l);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user