Re: [PATCH] Bluetooth: Fix ADDRINUSE check in SCO sockets

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

 



Hi Mikel,

On Thu, Apr 12, 2012, Mikel Astiz wrote:
> From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>
> 
> The ADDRINUSE error should be returned only when the SCO socket is being
> used as a server. This means it should be checked in sco_sock_listen()
> instead of in sco_sock_bind(), because in the later we can't know if it
> is a server or not.
> 
> This patch is required in order to use multiple SCO connections in the
> same Bluetooth adapter.
> 
> Signed-off-by: Mikel Astiz <mikel.astiz.oss@xxxxxxxxx>
> ---
>  net/bluetooth/sco.c |   49 ++++++++++++++++++++++++++++++-------------------
>  1 files changed, 30 insertions(+), 19 deletions(-)

In general the patch looks ok to me except for a few things regarding
the helper function:

> +static int __sco_is_addr_in_use(bdaddr_t *src)

I suppose bool makes more sense than int here. The naming sounds also a
bit awkward to me (otoh maybe this is a normal convention): I'd just
leave out the "_is_" part or at least move it after "addr" to make it
sound more like normal English.

Johan
--
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