chiark / gitweb /
bus: update kdbus.h
[elogind.git] / src / libsystemd-bus / bus-kernel.c
index ca36eb86384f70b7a084ab415c5b3867bf2698c5..5ed836eeb069fc1369e872f50253bd9a9881bf50 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/mman.h>
 
 #include "util.h"
+#include "strv.h"
 
 #include "bus-internal.h"
 #include "bus-message.h"
@@ -248,8 +249,8 @@ static int bus_message_setup_kmsg(sd_bus *b, sd_bus_message *m) {
         memset(m->kdbus, 0, sz);
 
         m->kdbus->flags =
-                ((m->header->flags & SD_BUS_MESSAGE_NO_REPLY_EXPECTED) ? 0 : KDBUS_MSG_FLAGS_EXPECT_REPLY) |
-                ((m->header->flags & SD_BUS_MESSAGE_NO_AUTO_START) ? KDBUS_MSG_FLAGS_NO_AUTO_START : 0);
+                ((m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) ? 0 : KDBUS_MSG_FLAGS_EXPECT_REPLY) |
+                ((m->header->flags & BUS_MESSAGE_NO_AUTO_START) ? KDBUS_MSG_FLAGS_NO_AUTO_START : 0);
         m->kdbus->dst_id =
                 well_known ? 0 :
                 m->destination ? unique : KDBUS_DST_ID_BROADCAST;
@@ -800,9 +801,10 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
                         destination = d->str;
                         break;
 
-                case KDBUS_ITEM_NAMES:
-                        m->creds.well_known_names = d->str;
-                        m->creds.well_known_names_size = l;
+                case KDBUS_ITEM_NAME:
+                        r = strv_extend(&m->creds.well_known_names, d->name.name);
+                        if (r < 0)
+                                goto fail;
                         m->creds.mask |= SD_BUS_CREDS_WELL_KNOWN_NAMES & bus->creds_mask;
                         break;
 
@@ -1065,7 +1067,6 @@ int bus_kernel_create_bus(const char *name, char **s) {
 
         make->size = ALIGN8(offsetof(struct kdbus_cmd_bus_make, items) + n->size);
         make->flags = KDBUS_MAKE_POLICY_OPEN;
-        make->bus_flags = 0;
         make->bloom_size = BLOOM_SIZE;
         assert_cc(BLOOM_SIZE % 8 == 0);