diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-25 17:46:45 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-25 18:04:04 +0100 |
commit | 693eb9a2d42d71445dad273a76e2470199d1dc5a (patch) | |
tree | 9d43271a1cc9c91ff8660eda7720ab755a427a84 /src/libsystemd-bus/bus-message.h | |
parent | 80a33f113bbdadf4fc7ffec7fed026fde59d232b (diff) |
bus: rename message "serial" to "cookie"
Even if the lower-leveld dbus1 protocol calls it "serial", let's expose
the word "cookie" for this instead, as this is what kdbus uses and since
it doesn't imply monotonicity the same way "serial" does.
Diffstat (limited to 'src/libsystemd-bus/bus-message.h')
-rw-r--r-- | src/libsystemd-bus/bus-message.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsystemd-bus/bus-message.h b/src/libsystemd-bus/bus-message.h index a973e9fd6c..5322375ef1 100644 --- a/src/libsystemd-bus/bus-message.h +++ b/src/libsystemd-bus/bus-message.h @@ -58,6 +58,10 @@ struct bus_header { uint8_t flags; uint8_t version; uint32_t body_size; + + /* Note that what the bus spec calls "serial" we'll call + "cookie" instead, because we don't want to imply that the + cookie was in any way monotonically increasing. */ uint32_t serial; uint32_t fields_size; } _packed_; @@ -80,7 +84,7 @@ struct sd_bus_message { sd_bus *bus; - uint32_t reply_serial; + uint32_t reply_cookie; const char *path; const char *interface; @@ -156,7 +160,7 @@ static inline uint64_t BUS_MESSAGE_BSWAP64(sd_bus_message *m, uint64_t u) { return BUS_MESSAGE_NEED_BSWAP(m) ? bswap_64(u) : u; } -static inline uint32_t BUS_MESSAGE_SERIAL(sd_bus_message *m) { +static inline uint32_t BUS_MESSAGE_COOKIE(sd_bus_message *m) { return BUS_MESSAGE_BSWAP32(m, m->header->serial); } |