chiark / gitweb /
bus: kdbus - skip only STARTER and IN_QUEUE names for NameOwnerChanged
authorKay Sievers <kay@vrfy.org>
Wed, 11 Dec 2013 04:30:46 +0000 (05:30 +0100)
committerKay Sievers <kay@vrfy.org>
Wed, 11 Dec 2013 04:38:25 +0000 (05:38 +0100)
src/libsystemd-bus/bus-kernel.c
src/libsystemd-bus/kdbus.h

index f66cf04e1640c759705fa942741ccdc0ff830b82..92acbeec5eda9148dfbed97f17d9c80893e513f2 100644 (file)
@@ -514,7 +514,7 @@ static int translate_name_change(sd_bus *bus, struct kdbus_msg *k, struct kdbus_
         assert(k);
         assert(d);
 
-        if (d->name_change.flags != 0)
+        if (d->name_change.flags & (KDBUS_NAME_IN_QUEUE|KDBUS_NAME_STARTER))
                 return 0;
 
         if (d->type == KDBUS_ITEM_NAME_ADD)
index d53c269573d1e6bb61469ed6f7867c8ab7281a8a..ccc65cb15a70140891674439345feb8eeb71167a 100644 (file)
@@ -527,18 +527,17 @@ struct kdbus_cmd_ns_make {
 /**
  * enum kdbus_name_flags - properties of a well-known name
  * @KDBUS_NAME_REPLACE_EXISTING:       Try to replace name of other connections
- * @KDBUS_NAME_QUEUE:                  Name should be queued if busy
  * @KDBUS_NAME_ALLOW_REPLACEMENT:      Allow the replacement of the name
+ * @KDBUS_NAME_QUEUE:                  Name should be queued if busy
  * @KDBUS_NAME_IN_QUEUE:               Name is queued
+ * @KDBUS_NAME_STARTER:                        Name is owned by a starter connection
  */
 enum kdbus_name_flags {
-       /* userspace → kernel */
        KDBUS_NAME_REPLACE_EXISTING             = 1 <<  0,
-       KDBUS_NAME_QUEUE                        = 1 <<  1,
-       KDBUS_NAME_ALLOW_REPLACEMENT            = 1 <<  2,
-
-       /* kernel → userspace */
-       KDBUS_NAME_IN_QUEUE                     = 1 << 16,
+       KDBUS_NAME_ALLOW_REPLACEMENT            = 1 <<  1,
+       KDBUS_NAME_QUEUE                        = 1 <<  2,
+       KDBUS_NAME_IN_QUEUE                     = 1 <<  3,
+       KDBUS_NAME_STARTER                      = 1 <<  4,
 };
 
 /**
@@ -609,7 +608,7 @@ struct kdbus_name_list {
  *                     @name is required. kdbus will look up the name to determine
  *                     the ID in this case.
  * @offset:            Returned offset in the caller's pool buffer where the
- *                     kdbus_name_info struct result is stored. The user must
+ *                     kdbus_conn_info struct result is stored. The user must
  *                     use KDBUS_CMD_FREE to free the allocated memory.
  * @name:              The optional well-known name to look up. Only needed in
  *                     case @id is zero.