Hi Gustavo, > * 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] I am fixing that with the next patch. I just ended up splitting them into two to get this logical correct. Regards Marcel -- 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