Re: [PATCH v5 1/6] Fix disconnect SCO at same time than RFCOMM

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

 



Hi Frédéric,

2011/9/6 Frédéric Dalleau <frederic.dalleau@xxxxxxxxxxxxxxx>:
> If RFCOMM disconnects, SCO should be disconnected too.
> ---
>  audio/gateway.c |    7 +------
>  1 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/audio/gateway.c b/audio/gateway.c
> index 142b12e..59c91dd 100644
> --- a/audio/gateway.c
> +++ b/audio/gateway.c
> @@ -222,15 +222,10 @@ static void sco_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
>  static gboolean rfcomm_disconnect_cb(GIOChannel *chan, GIOCondition cond,
>                        struct audio_device *dev)
>  {
> -       struct gateway *gw = dev->gateway;
> -
>        if (cond & G_IO_NVAL)
>                return FALSE;
>
> -       g_io_channel_shutdown(gw->rfcomm, TRUE, NULL);
> -       g_io_channel_unref(gw->rfcomm);
> -       gw->rfcomm = NULL;
> -       change_state(dev, GATEWAY_STATE_DISCONNECTED);
> +       gateway_close(dev);
>
>        return FALSE;
>  }
> --
> 1.7.1

Ack.

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