Remove message->priority field

A warning is emitted from sd_bus_message_{get,set}_priority. Those functions
are exposed by pystemd, so we have no easy way of checking if anything is
calling them.

Just making the functions always return without doing anything would be an
option, but then we could leave the caller with an undefined variable. So I
think it's better to make the functions emit a warnings and return priority=0
in the get operation.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-04-07 15:29:23 +02:00
committed by Lennart Poettering
parent 6635f57d3e
commit c3362c2f97
5 changed files with 18 additions and 8 deletions
-1
View File
@@ -1200,7 +1200,6 @@ static int message_json(sd_bus_message *m, FILE *f) {
JSON_BUILD_PAIR("endian", JSON_BUILD_STRING(e)),
JSON_BUILD_PAIR("flags", JSON_BUILD_INTEGER(m->header->flags)),
JSON_BUILD_PAIR("version", JSON_BUILD_INTEGER(m->header->version)),
JSON_BUILD_PAIR_CONDITION(m->priority != 0, "priority", JSON_BUILD_INTEGER(m->priority)),
JSON_BUILD_PAIR("cookie", JSON_BUILD_INTEGER(BUS_MESSAGE_COOKIE(m))),
JSON_BUILD_PAIR_CONDITION(m->reply_cookie != 0, "reply_cookie", JSON_BUILD_INTEGER(m->reply_cookie)),
JSON_BUILD_PAIR_CONDITION(m->sender, "sender", JSON_BUILD_STRING(m->sender)),