diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-03-20 05:29:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-03-20 23:00:10 +0100 |
commit | 80a46c7313b8fc4682881cb3a2ca9e4d743fcb2b (patch) | |
tree | 20ebf80690e694bf13eb484f7993e73c3328e5a5 /src/libsystemd-bus/bus-message.h | |
parent | 9a17484d986f6cb8828afdf911db425b574c63fd (diff) |
bus: demarshal header fields properly
Diffstat (limited to 'src/libsystemd-bus/bus-message.h')
-rw-r--r-- | src/libsystemd-bus/bus-message.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libsystemd-bus/bus-message.h b/src/libsystemd-bus/bus-message.h index 89cb3e1efe..3035efc8c2 100644 --- a/src/libsystemd-bus/bus-message.h +++ b/src/libsystemd-bus/bus-message.h @@ -57,7 +57,6 @@ struct sd_bus_message { const char *member; const char *destination; const char *sender; - const char *signature; sd_bus_error error; @@ -92,11 +91,7 @@ struct sd_bus_message { char *peeked_signature; }; -#if __BYTE_ORDER == __BIG_ENDIAN -#define BUS_MESSAGE_NEED_BSWAP(m) ((m)->header->endian != SD_BUS_BIG_ENDIAN) -#else -#define BUS_MESSAGE_NEED_BSWAP(m) ((m)->header->endian != SD_BUS_LITTLE_ENDIAN) -#endif +#define BUS_MESSAGE_NEED_BSWAP(m) ((m)->header->endian != SD_BUS_NATIVE_ENDIAN) static inline uint16_t BUS_MESSAGE_BSWAP16(sd_bus_message *m, uint16_t u) { return BUS_MESSAGE_NEED_BSWAP(m) ? bswap_16(u) : u; @@ -132,3 +127,4 @@ int bus_message_parse(sd_bus_message *m); int bus_message_seal(sd_bus_message *m, uint64_t serial); int bus_message_dump(sd_bus_message *m); int bus_message_get_blob(sd_bus_message *m, void **buffer, size_t *sz); +int bus_message_from_malloc(void *buffer, size_t length, sd_bus_message **ret); |