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

Daniel Mack daniel at zonque.org
Tue Feb 18 02:11:22 PST 2014


On 02/18/2014 10:50 AM, Radoslaw Pajak wrote:
> 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;
>  
> 

Applied, thanks!


More information about the systemd-devel mailing list