All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ v2] Fix remove temporary link key for No Bonding
Date: Mon, 22 Aug 2011 15:04:49 +0300	[thread overview]
Message-ID: <CABBYNZKuP3BwGTUt_t1h8XqrbXbt+RGzzTCKhxG-NvHSBStwuw@mail.gmail.com> (raw)
In-Reply-To: <1314006934-4953-2-git-send-email-dmitriy.paliy@nokia.com>

Hi Dmitriy,

On Mon, Aug 22, 2011 at 12:55 PM, Dmitriy Paliy <dmitriy.paliy@nokia.com> wrote:
> This fixes regression caused by 33cdfcb0fabcfb5260953a13ae277b5abe9a322d.
> Temporary link key should be removed after device is disconnected if
> bonding information is not stored in file system.
>
> Currently, the key is deleted only when paired device is removed, or
> adapter is powered off. In case of No Bonding authentication, device is
> not paired after disconnection, which results in link key left in memory.
>
> On the other hand, device is not necessarily removed after disconnection
> that also leaves unneeded temporary link key in memory.
> ---
>  src/device.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/src/device.c b/src/device.c
> index 9dd657c..f323bf8 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -855,8 +855,10 @@ void device_remove_connection(struct btd_device *device, DBusConnection *conn)
>                device->disconnects = g_slist_remove(device->disconnects, msg);
>        }
>
> -       if (device_is_paired(device) && !device_is_bonded(device))
> +       if (device_is_paired(device) && !device_is_bonded(device)) {
> +               btd_adapter_remove_bonding(device->adapter, &device->bdaddr);
>                device_set_paired(device, FALSE);
> +       }

How about move btd_adapter_remove_bonding to device_set_paired e.g. if
(!value) btd_adapter_remove_bonding?

-- 
Luiz Augusto von Dentz

  reply	other threads:[~2011-08-22 12:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22  9:55 [PATCH BlueZ v2 0/1] Fix remove temporary link key for No Bonding Dmitriy Paliy
2011-08-22  9:55 ` [PATCH BlueZ v2] " Dmitriy Paliy
2011-08-22 12:04   ` Luiz Augusto von Dentz [this message]
2011-08-22 12:44     ` Dmitriy Paliy

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=CABBYNZKuP3BwGTUt_t1h8XqrbXbt+RGzzTCKhxG-NvHSBStwuw@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=dmitriy.paliy@nokia.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.