ListNames and ListQueuedOwners updated to work with new kdbus
[platform/upstream/dbus.git] / dbus / dbus-transport-kdbus.c
index 690c32c..b95339c 100644 (file)
@@ -315,7 +315,7 @@ static struct kdbus_msg* kdbus_init_msg(const char* name, __u64 dst_id, uint64_t
 
     memset(msg, 0, msg_size);
     msg->size = msg_size;
-    msg->payload_type = KDBUS_PAYLOAD_DBUS1;
+    msg->payload_type = KDBUS_PAYLOAD_DBUS;
     msg->dst_id = name ? 0 : dst_id;
     msg->src_id = strtoull(dbus_bus_get_unique_name(transport->base.connection), NULL , 10);
 
@@ -518,6 +518,7 @@ static int kdbus_write_msg(DBusTransportKdbus *transport, DBusMessage *message,
 static dbus_bool_t bus_register_kdbus(char* name, DBusTransportKdbus* transportS)
 {
        struct kdbus_cmd_hello __attribute__ ((__aligned__(8))) hello;
+       memset(&hello, 0, sizeof(hello));
 
        hello.conn_flags = KDBUS_HELLO_ACCEPT_FD/* |
                           KDBUS_HELLO_ATTACH_COMM |
@@ -657,8 +658,7 @@ LOOKUP(MSG);
 const char *enum_PAYLOAD(long long id);
 TABLE(PAYLOAD) = {
        ENUM(KDBUS_PAYLOAD_KERNEL),
-       ENUM(KDBUS_PAYLOAD_DBUS1),
-       ENUM(KDBUS_PAYLOAD_GVARIANT),
+       ENUM(KDBUS_PAYLOAD_DBUS),
 };
 LOOKUP(PAYLOAD);