All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ v3] Fix unpair device when disconnected for No Bonding
Date: Mon, 11 Jul 2011 15:52:54 +0300	[thread overview]
Message-ID: <20110711125254.GA16751@dell.ger.corp.intel.com> (raw)
In-Reply-To: <1310386806-19305-2-git-send-email-dmitriy.paliy@nokia.com>

Hi Dmitriy,

On Mon, Jul 11, 2011, Dmitriy Paliy wrote:
> Fix Paired device property if 'No Bonding' authentication is used. It is
> set to be false when device is disconnected and no link key is stored.
> Otherwise, there can be cases when device is still valid and being
> claimed as paired without available bonding information.
> 
> For instanse, use of CreateDevice method call and obex client file
> transfer is such use case.
> ---
>  src/device.c |   19 ++++++++++++++++++-
>  src/device.h |    1 +
>  src/event.c  |    8 ++++++--
>  3 files changed, 25 insertions(+), 3 deletions(-)

Applied, and I also pushed a cleanup patch on top of it because
device_remove_bonding was essentially useless. One thing that I'm
thinking of is maybe it'd be better to get rid of the paired and bonded
booleans have a single enum for them since they are dependent on each
other and one combination of boolean values (!paired && bonded) is not
possible. Maybe something like the following inside struct btd_device:

	enum {
		DEVICE_PAIRING_STATUS_NONE,
		DEVICE_PAIRING_STATUS_PAIRED,
		DEVICE_PAIRING_STATUS_BONDED,
	} pairing_status;

Thoughts?

Johan

  reply	other threads:[~2011-07-11 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-11 12:20 [PATCH BlueZ v3 0/1] Fix unpair device when disconnected for No Bonding Dmitriy Paliy
2011-07-11 12:20 ` [PATCH BlueZ v3] " Dmitriy Paliy
2011-07-11 12:52   ` Johan Hedberg [this message]
2011-07-11 17:39     ` 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=20110711125254.GA16751@dell.ger.corp.intel.com \
    --to=johan.hedberg@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.