summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2014-12-05 10:03:00 +0100
committerDaniel Mack <daniel@zonque.org>2014-12-05 10:04:02 +0100
commit840ceb897ff2b44275dcf2fe8227a750941789f0 (patch)
treec963b314f40475256252e029896782f167bf2ca9 /src/libsystemd/sd-bus
parentbaade8cc237c37bd8905d86ec6e9c7872d4abe03 (diff)
sd-bus: follow kdbus changes (ABI break)
Implement a recent change in the kdbus pool logic: PAYLOAD_VEC_OFF items are now referencing offsets relative to the connection's pool, not to the item itself. Follow this change in sd-bus.
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index d81e9d2546..3a809e4aa6 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -422,7 +422,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
case KDBUS_ITEM_PAYLOAD_OFF:
if (!h) {
- h = (struct bus_header *)((uint8_t *)k + d->vec.offset);
+ h = (struct bus_header *)((uint8_t *)bus->kdbus_buffer + d->vec.offset);
if (!bus_header_is_complete(h, d->vec.size))
return -EBADMSG;
@@ -514,11 +514,11 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
if (idx >= begin_body) {
if (!part->is_zero)
- part->data = (uint8_t *)k + d->vec.offset;
+ part->data = (uint8_t *)bus->kdbus_buffer + d->vec.offset;
part->size = d->vec.size;
} else {
if (!part->is_zero)
- part->data = (uint8_t *)k + d->vec.offset + (begin_body - idx);
+ part->data = (uint8_t *)bus->kdbus_buffer + d->vec.offset + (begin_body - idx);
part->size = d->vec.size - (begin_body - idx);
}