names: add the activator connection itself to the list of of activator names
authorDaniel Mack <zonque@gmail.com>
Sat, 21 Dec 2013 22:58:29 +0000 (23:58 +0100)
committerDaniel Mack <zonque@gmail.com>
Sat, 21 Dec 2013 22:58:29 +0000 (23:58 +0100)
names.c

diff --git a/names.c b/names.c
index 8757e278e004ff65379232d47d04f75500685771..d56a709b60ed3a9de4bacac4faf206206d702875 100644 (file)
--- a/names.c
+++ b/names.c
@@ -728,11 +728,20 @@ static int kdbus_name_list_all(struct kdbus_conn *conn, u64 flags,
                        struct kdbus_name_entry *e;
 
                        list_for_each_entry(e, &c->names_list, conn_entry) {
+                               struct kdbus_conn *a = e->activator;
+
                                ret = kdbus_name_list_write(conn, c, &p,
                                                            e, write);
                                if (ret < 0)
                                        return ret;
 
+                               if (a != c) {
+                                       ret = kdbus_name_list_write(conn, a, &p,
+                                                                   e, write);
+                                       if (ret < 0)
+                                               return ret;
+                               }
+
                                added = true;
                        }
                }