chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bus: rename message "serial" to "cookie"
[elogind.git]
/
src
/
libsystemd-bus
/
bus-message.h
diff --git
a/src/libsystemd-bus/bus-message.h
b/src/libsystemd-bus/bus-message.h
index a973e9fd6c5b9cdb58eb3cac9ae2e71f92fb1328..5322375ef1c576eb596e13bf7d009b85fa6143d5 100644
(file)
--- 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;
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_;
uint32_t serial;
uint32_t fields_size;
} _packed_;
@@
-80,7
+84,7
@@
struct sd_bus_message {
sd_bus *bus;
sd_bus *bus;
- uint32_t reply_
serial
;
+ uint32_t reply_
cookie
;
const char *path;
const char *interface;
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;
}
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);
}
return BUS_MESSAGE_BSWAP32(m, m->header->serial);
}