From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/2] Fix not unmarking temporary flag when a new key is created
Date: Wed, 11 Aug 2010 09:27:57 -0400 [thread overview]
Message-ID: <20100811132757.GC13302@jh-x301> (raw)
In-Reply-To: <1281530667-25379-2-git-send-email-luiz.dentz@gmail.com>
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
next prev parent reply other threads:[~2010-08-11 13:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 12:44 [PATCH 1/2] Fix not deleting stored keys when a new one is created Luiz Augusto von Dentz
2010-08-11 12:44 ` [PATCH 2/2] Fix not unmarking temporary flag when a new key " Luiz Augusto von Dentz
2010-08-11 13:27 ` Johan Hedberg [this message]
2010-08-11 13:43 ` Luiz Augusto von Dentz
2010-08-11 13:26 ` [PATCH 1/2] Fix not deleting stored keys when a new one " Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100811132757.GC13302@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox