linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/3] Bluetooth: Fix not setting the chan state
Date: Mon, 20 Jun 2011 17:03:38 -0300	[thread overview]
Message-ID: <20110620200338.GE7240@joana> (raw)
In-Reply-To: <20110620200156.GA13325@piper>

Hi Vinicius,

* Vinicius Costa Gomes <vinicius.gomes@openbossa.org> [2011-06-20 17:01:56 -0300]:

> Hi Gustavo,
> 
> On 16:31 Mon 20 Jun, Gustavo F. Padovan wrote:
> > * Vinicius Costa Gomes <vinicius.gomes@openbossa.org> [2011-06-17 22:46:25 -0300]:
> > 
> > > When the connection is ready we should set the connection
> > > to CONNECTED so userspace can use it.
> > > 
> > > Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
> > > ---
> > >  net/bluetooth/l2cap_core.c |    3 +--
> > >  1 files changed, 1 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> > > index 25f31f4..4af61fb 100644
> > > --- a/net/bluetooth/l2cap_core.c
> > > +++ b/net/bluetooth/l2cap_core.c
> > > @@ -895,8 +895,7 @@ static void l2cap_chan_ready(struct sock *sk)
> > >  	chan->conf_state = 0;
> > >  	__clear_chan_timer(chan);
> > >  
> > > -	sk->sk_state = BT_CONNECTED;
> > > -	sk->sk_state_change(sk);
> > > +	l2cap_state_change(chan, BT_CONNECTED);
> > 
> > Why are you removing the sk->sk_state_change() ?
> 
> I was thinking that l2cap_state_change() would do this for me. May I ask
> why it doesn't call sk->sk_state_change()?

Because we don't call sk->sk_state_change() every time the state changes.

	Gustavo

      reply	other threads:[~2011-06-20 20:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-18  1:46 [PATCH 1/3] Bluetooth: Fix not setting the chan state Vinicius Costa Gomes
2011-06-18  1:46 ` [PATCH 2/3] Bluetooth: Fix crash when setting a LE socket to ready Vinicius Costa Gomes
2011-06-18  1:46 ` [PATCH 3/3] Bluetooth: Remove useless access to the socket Vinicius Costa Gomes
2011-06-20 19:32   ` Gustavo F. Padovan
2011-06-20 19:31 ` [PATCH 1/3] Bluetooth: Fix not setting the chan state Gustavo F. Padovan
2011-06-20 20:01   ` Vinicius Costa Gomes
2011-06-20 20:03     ` Gustavo F. Padovan [this message]

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=20110620200338.GE7240@joana \
    --to=padovan@profusion.mobi \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=vinicius.gomes@openbossa.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).