[systemd-devel] [PATCH] connection: update conn->flags before kdbus_notify_id_change uses them

Radoslaw Pajak r.pajak at samsung.com
Tue Feb 18 01:50:42 PST 2014


Signed-off-by: Radoslaw Pajak <r.pajak at samsung.com>
---
 connection.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/connection.c b/connection.c
index 95f75e1..9982da2 100644
--- a/connection.c
+++ b/connection.c
@@ -1884,6 +1884,9 @@ int kdbus_conn_new(struct kdbus_ep *ep,
 	BUILD_BUG_ON(sizeof(bus->id128) != sizeof(hello->id128));
 	memcpy(hello->id128, bus->id128, sizeof(hello->id128));
 
+	conn->flags = hello->conn_flags;
+	conn->attach_flags = hello->attach_flags;
+
 	/* notify about the new active connection */
 	ret = kdbus_notify_id_change(KDBUS_ITEM_ID_ADD, conn->id,
conn->flags,
 				     &notify_list);
@@ -1891,9 +1894,6 @@ int kdbus_conn_new(struct kdbus_ep *ep,
 		goto exit_unref_ep;
 	kdbus_conn_kmsg_list_send(conn->ep, &notify_list);
 
-	conn->flags = hello->conn_flags;
-	conn->attach_flags = hello->attach_flags;
-
 	if (activator_name) {
 		u64 flags = KDBUS_NAME_ACTIVATOR;
 
-- 
1.7.9.5




More information about the systemd-devel mailing list