Re: [PATCH BlueZ v0 1/7] btio: Fix bind SCO socket only if server

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

 



Hi Mikel,

On Wed, Apr 11, 2012 at 9:57 AM, Mikel Astiz <mikel.astiz.oss@xxxxxxxxx> wrote:
> From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>
>
> When the socket is open is client mode, the bind() system call should
> not be used.
> ---
>  btio/btio.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/btio/btio.c b/btio/btio.c
> index 9781ec4..7564d85 100644
> --- a/btio/btio.c
> +++ b/btio/btio.c
> @@ -1317,8 +1317,9 @@ static GIOChannel *create_io(BtIOType type, gboolean server,
>                        ERROR_FAILED(err, "socket(SEQPACKET, SCO)", errno);
>                        return NULL;
>                }
> -               if (sco_bind(sock, &opts->src, err) < 0)
> -                       goto failed;
> +               if (server)
> +                       if (sco_bind(sock, &opts->src, err) < 0)
> +                               goto failed;
>                if (!sco_set(sock, opts->mtu, err))
>                        goto failed;
>                break;
> --
> 1.7.7.6

Ack, in future send this kind of trivial/obvious fix in separated so
it can easily be picked.


-- 
Luiz Augusto von Dentz
--
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