From f8c2425287c8362ae3a3c9acfb9e23a16862b38a Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 22 Sep 2014 18:20:14 +0200 Subject: sd-bus: sync kdbus.h (API+ABI break) The kdbus logic name registry logic was changed to transport the actual name to acquire, release or report in a kdbus item. This brings the name API a little more in line with other calls, and allows for later augmentation. Follow that change on the systemd side. --- src/bus-proxyd/bus-proxyd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/bus-proxyd') diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c index d35d7f63b2..a5387bb234 100644 --- a/src/bus-proxyd/bus-proxyd.c +++ b/src/bus-proxyd/bus-proxyd.c @@ -743,12 +743,15 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m) { name_list = (struct kdbus_name_list *) ((uint8_t *) a->kdbus_buffer + cmd.offset); KDBUS_ITEM_FOREACH(name, name_list, names) { + const char *entry_name = NULL; + struct kdbus_item *item; char *n; - if (name->size <= sizeof(*name)) - continue; + KDBUS_ITEM_FOREACH(item, name, items) + if (item->type == KDBUS_ITEM_NAME) + entry_name = item->str; - if (!streq(name->name, arg0)) + if (!streq_ptr(entry_name, arg0)) continue; if (asprintf(&n, ":1.%llu", (unsigned long long) name->owner_id) < 0) { -- cgit v1.2.3-54-g00ecf