Re: [PATCH 3/3] Bluetooth: Don't check source address in SCO bind function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

* Marcel Holtmann <marcel@xxxxxxxxxxxx> [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@xxxxxxxxxxxx>
> ---
>  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]

	Gustavo
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux