public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/3] Bluetooth: Don't check source address in SCO bind function
Date: Thu, 19 Apr 2012 17:53:38 +0200	[thread overview]
Message-ID: <1334850818.16897.294.camel@aeonflux> (raw)
In-Reply-To: <20120419145222.GE4127@joana>

Hi Gustavo,

> * Marcel Holtmann <marcel@holtmann.org> [2012-04-19 13:43:53 +0200]:
> 
> > Checking the source address in SCO bind function will prevent from
> > having an incoming and outgoing SCO socket. However that might be
> > needed in case of multiple SCO connections on a single device.
> > 
> > Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> > ---
> >  net/bluetooth/sco.c |   16 ++++++----------
> >  1 files changed, 6 insertions(+), 10 deletions(-)
> > 
> > diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
> > index 2fb9636..8b2548c 100644
> > --- a/net/bluetooth/sco.c
> > +++ b/net/bluetooth/sco.c
> > @@ -463,7 +463,6 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
> >  {
> >  	struct sockaddr_sco *sa = (struct sockaddr_sco *) addr;
> >  	struct sock *sk = sock->sk;
> > -	bdaddr_t *src = &sa->sco_bdaddr;
> >  	int err = 0;
> >  
> >  	BT_DBG("sk %p %s", sk, batostr(&sa->sco_bdaddr));
> > @@ -478,17 +477,14 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
> >  		goto done;
> >  	}
> >  
> > -	write_lock(&sco_sk_list.lock);
> > -
> > -	if (bacmp(src, BDADDR_ANY) && __sco_get_sock_by_addr(src)) {
> > -		err = -EADDRINUSE;
> 
> this patch adds a compiling warning:
> 
>   CC [M]  net/bluetooth/sco.o
>   net/bluetooth/sco.c:277:21: warning: ‘__sco_get_sock_by_addr’ defined
>   but not used [-Wunused-function]

I am fixing that with the next patch. I just ended up splitting them
into two to get this logical correct.

Regards

Marcel



  reply	other threads:[~2012-04-19 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 11:43 [PATCH 3/3] Bluetooth: Don't check source address in SCO bind function Marcel Holtmann
2012-04-19 14:52 ` Gustavo Padovan
2012-04-19 15:53   ` Marcel Holtmann [this message]
2012-04-20 17:20 ` 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=1334850818.16897.294.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=gustavo@padovan.org \
    --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