Re: [PATCH 2/2] Fix not unmarking temporary flag when a new key is created

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

On Wed, Aug 11, 2010, Luiz Augusto von Dentz wrote:
> --- a/src/dbus-hci.c
> +++ b/src/dbus-hci.c
> @@ -746,8 +746,8 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
>  	else if (!bonding && old_key_type == 0xff)
>  		hcid_dbus_bonding_process_complete(local, peer, 0);
>  
> -	if (temporary)
> -		device_set_temporary(device, TRUE);
> +	if (device_is_temporary(device) != temporary)
> +		device_set_temporary(device, temporary);
>  
>  	return 0;

I'd prefer if you just call device_set_temporary(device, temporary)
directly. That'd save you the if-check and a call to device_is_temporary.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux