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.

(cherry picked from commit f44b9efcec)
This commit is contained in:
Lukas Nykryn
2015-01-15 21:03:08 -05:00
committed by Zbigniew Jędrzejewski-Szmek
parent 91d90659f7
commit e36091f179
2 changed files with 2 additions and 2 deletions
+1 -1
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);
}
+1 -1
View File
@@ -2423,7 +2423,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);
}