Re: [PATCH 08/25] Profiles using MCAP can close a MCL deciding if it should be cached

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

 



Hi Santiago,

2010/5/10 Santiago Carot-Nemesio <sancane@xxxxxxxxx>:
> From: Santiago Carot Nemesio <sancane@xxxxxxxxx>
>
> ---
>  mcap/mcap.c |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/mcap/mcap.c b/mcap/mcap.c
> index 0112154..8f6fb78 100644
> --- a/mcap/mcap.c
> +++ b/mcap/mcap.c
> @@ -305,6 +305,23 @@ static void mcap_uncache_mcl(struct mcap_mcl *mcl)
>        mcl->ctrl &= ~MCAP_CTRL_FREE;
>  }
>
> +void mcap_close_mcl(struct mcap_mcl *mcl, gboolean cache)
> +{
> +       if (!mcl)
> +               return;
> +
> +       if (mcl->cc) {
> +               g_io_channel_shutdown(mcl->cc, TRUE, NULL);
> +               g_io_channel_unref(mcl->cc);
> +               mcl->cc = NULL;
> +       }
> +
> +       mcl->state = MCL_IDLE;
> +
> +       if (!cache)
> +               mcl->ctrl |= MCAP_CTRL_NOCACHE;
> +}
> +

According to MCAP spec (page 10, section 2.1.2), when the CC is
closed, all of its associated DCs are closed as well. In fact, DCs are
propely closed on mcap_mcl_free , but not on mcap_close_mcl. So, which
one really closes MCL?

[]´s
--Raul
--
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