chiark / gitweb /
sd-bus: sync kdbus.h (API break)
authorDaniel Mack <daniel@zonque.org>
Tue, 23 Sep 2014 14:13:54 +0000 (16:13 +0200)
committerDaniel Mack <daniel@zonque.org>
Tue, 23 Sep 2014 14:16:04 +0000 (16:16 +0200)
Just a rename of two struct members to make the header file c++ compatible.

src/libsystemd/sd-bus/bus-control.c
src/libsystemd/sd-bus/bus-kernel.c
src/libsystemd/sd-bus/kdbus.h

index 50b662f..b22f4c4 100644 (file)
@@ -851,8 +851,8 @@ static int add_name_change_match(sd_bus *bus,
                         offsetof(struct kdbus_notify_name_change, name) +
                         l;
 
-                item->name_change.old.id = old_owner_id;
-                item->name_change.new.id = new_owner_id;
+                item->name_change.old_id.id = old_owner_id;
+                item->name_change.new_id.id = new_owner_id;
 
                 if (name)
                         memcpy(item->name_change.name, name, l);
index c30491e..236e878 100644 (file)
@@ -950,19 +950,19 @@ static int translate_name_change(sd_bus *bus, struct kdbus_msg *k, struct kdbus_
         assert(k);
         assert(d);
 
-        if (d->type == KDBUS_ITEM_NAME_ADD || (d->name_change.old.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR)))
+        if (d->type == KDBUS_ITEM_NAME_ADD || (d->name_change.old_id.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR)))
                 old_owner[0] = 0;
         else
-                sprintf(old_owner, ":1.%llu", (unsigned long long) d->name_change.old.id);
+                sprintf(old_owner, ":1.%llu", (unsigned long long) d->name_change.old_id.id);
 
-        if (d->type == KDBUS_ITEM_NAME_REMOVE || (d->name_change.new.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR))) {
+        if (d->type == KDBUS_ITEM_NAME_REMOVE || (d->name_change.new_id.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_ACTIVATOR))) {
 
                 if (isempty(old_owner))
                         return 0;
 
                 new_owner[0] = 0;
         } else
-                sprintf(new_owner, ":1.%llu", (unsigned long long) d->name_change.new.id);
+                sprintf(new_owner, ":1.%llu", (unsigned long long) d->name_change.new_id.id);
 
         return push_name_owner_changed(bus, d->name_change.name, old_owner, new_owner);
 }
index 0718b84..b167c4d 100644 (file)
@@ -46,7 +46,7 @@ struct kdbus_notify_id_change {
 /**
  * struct kdbus_notify_name_change - name registry change message
  * @old:               ID and flags of former owner of a name
- * @new:               ID and flags of new owner of a name
+ * @now:               ID and flags of new owner of a name
  * @name:              Well-known name
  *
  * Sent from kernel to userspace when the owner or activator of
@@ -58,8 +58,8 @@ struct kdbus_notify_id_change {
  *   KDBUS_ITEM_NAME_CHANGE
  */
 struct kdbus_notify_name_change {
-       struct kdbus_notify_id_change old;
-       struct kdbus_notify_id_change new;
+       struct kdbus_notify_id_change old_id;
+       struct kdbus_notify_id_change new_id;
        char name[0];
 };