From: Johan Hedberg <johan.hedberg@gmail.com>
To: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/2] Bluetooth: Add support for encryption key refresh
Date: Thu, 7 Jun 2012 15:14:14 +0800 [thread overview]
Message-ID: <20120607071414.GA12091@x220> (raw)
In-Reply-To: <20120607070720.GC32366@aemeltch-MOBL1>
Hi Andrei,
On Thu, Jun 07, 2012, Andrei Emeltchenko wrote:
> > + if (conn->state == BT_CONFIG) {
> > + if (!ev->status)
> > + conn->state = BT_CONNECTED;
> > +
> > + hci_proto_connect_cfm(conn, ev->status);
> > + hci_conn_put(conn);
> > + } else {
> > + hci_auth_cfm(conn, ev->status);
> > +
> > + hci_conn_hold(conn);
>
> If you want to keep extra hold(conn) you may just not put. Is this typo?
>
> > + conn->disc_timeout = HCI_DISCONN_TIMEOUT;
> > + hci_conn_put(conn);
> > + }
This is just copy-paste from hci_auth_complete_evt(). I think the
intention of the hold+put is to restart or remove the disconnect timer
with the new disc_timeout value or something similar. If the code above
needs fixing then so does the code in hci_auth_complete_evt().
Johan
next prev parent reply other threads:[~2012-06-07 7:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 6:58 [PATCH 0/2] Bluetooth: Fix SMP support for encryption key refresh Johan Hedberg
2012-06-07 6:58 ` [PATCH 1/2] Bluetooth: Fix SMP security elevation from medium to high Johan Hedberg
2012-06-08 7:19 ` Gustavo Padovan
2012-06-07 6:58 ` [PATCH 2/2] Bluetooth: Add support for encryption key refresh Johan Hedberg
2012-06-07 7:07 ` Andrei Emeltchenko
2012-06-07 7:14 ` Johan Hedberg [this message]
2012-06-07 7:25 ` Andrei Emeltchenko
2012-06-08 7:20 ` Gustavo Padovan
2012-06-08 15:31 ` [PATCH v2] " Johan Hedberg
2012-06-09 0:12 ` Gustavo Padovan
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=20120607071414.GA12091@x220 \
--to=johan.hedberg@gmail.com \
--cc=andrei.emeltchenko.news@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).