1
0
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:
Lukas Nykryn 2014-11-20 16:06:18 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 58f10d401f
commit f44b9efcec
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}