Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2624462rda; Wed, 25 Oct 2023 08:01:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlU8N+VzSIqezEkO94f/mQTRW7hgEZZSFkKZu4yveajJNcZRngJ83/0ymtVB9RuvxcPJAn X-Received: by 2002:a05:6808:202a:b0:3b2:d8cb:d299 with SMTP id q42-20020a056808202a00b003b2d8cbd299mr19119648oiw.16.1698246069228; Wed, 25 Oct 2023 08:01:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698246069; cv=pass; d=google.com; s=arc-20160816; b=VEwCAkDG2sUIMKRNyuITAQ+SYyKOji16SDv+w2CBArGpGIySsCHAGtZdd4gSqorzsu Yp0eYnfVKrQj5+BGnYS6+g/oX/Im9cSPJXiD/sXfPvMQPZ6mXpHXWSTUKzA6zwEDVv3l KxMyJUc2WvAzyzUAvXXvavkMOD8uA+0PrtwRLxZBppytABSm67LJoEuz3wBNHGK+hYBC qnE5yu8Q/xwPW4uhheVDXUut8xPB76b6yM7I+HFvbUxYEBAM41CIA35y1QuMg/4oSQFs ctxoP5hCwaKmefCxIBN2vHo3PEKl2ZnH1tz+YvKElXJ0ZB5c+0ML4GHV6dSNtMVbhky2 lRxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z6C6s+hbKzLzls1TzDOUGa/VBKD6fPJpPQUs3IQhwic=; fh=z9iGP4l7xSTEJRW5hsadvPrAVCwRvhfdVJbZYHezquc=; b=uElL7SCTOltu6toDZaWpgx1UXM37r3KxkvNaDdxTDWygyHfhP1CnhrweJExZCi99t9 7x7ISgibrIMPnGImWohhBkRFwKpqOZs9fCAwVJgmTRJY/xrxCAdhHCuJHUAlPn90qCtK 1cQtmeOtf6UDTFo7jfLKaiaXbxQ4clf0LxZB9Hx9xck9cHAAXHaN47B2DLe3jtpOjXVs 5o/oRSsmLgdAwFIIVg1qOztJoKzcKmWC4lWnaleghc3ER266Yl9yxAjKhclOA5w5BL4M dHYG6z+j1VCViXpTskY9BRgArwND+xu0SskXBx09GMp5eu0N/ZmGmwjSQjPNayh3GqPZ ExkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=pAt6tkeB; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id d4-20020a67c484000000b004507ce1748esi1249018vsk.765.2023.10.25.08.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 08:01:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=pAt6tkeB; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5A38B8044371; Wed, 25 Oct 2023 08:00:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234446AbjJYPAj (ORCPT + 99 others); Wed, 25 Oct 2023 11:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232072AbjJYPAi (ORCPT ); Wed, 25 Oct 2023 11:00:38 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2076.outbound.protection.outlook.com [40.107.22.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED996133 for ; Wed, 25 Oct 2023 08:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LPaJDnIyqI9oUo38+BKKHu1Uc8dHQcQ2Smo3qf/YaCGf5aPWPMZqBBGWhhKAmO/KfXoqwx+B52D9SieGB/bAxlE5puOS7vspKIUrA0cnD5+/mXaM4BU6n/tXGlS3c/obhELbQGpu1T6UdYE/qFPRH6reAq4JKy+ri/sK8BgdqBxz4LllH2//ta+n1LoBrrM6Gyt1y/nX7Y3jQs8G8zZ4Du0yPNyRIEWc1aKxxTFjT4POroF3S8cgJKlVAxAC2PrqEoMP12vJ4ozgwc4bS4OMTP6UoB1UtFYCGzaQCn8JqEMJsVQV3SR6dj5mJPvI0hJsnAMkjUaltXWMdkRTSb9gcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Z6C6s+hbKzLzls1TzDOUGa/VBKD6fPJpPQUs3IQhwic=; b=blqUCjDFuw0vvp/owiaTJpsoezbAEnPu8vLhD3WEho5snYGkB3hCfvM1HfHvUJvT/DGly/Zqes9gbsAvTPGr0/i5xLeQO8Du/KzDKUwZ1caGfA4poiH34eIMlQT8teTOXgLcAS0bjAf2YJ/z1QG84pcQxhLSflt/pVXJqkkSLYf1F6fvF9qJ7tiM/D5jWMUPlq2LRC1nOQlAnXL7iUAFotuaMfoAKqVirN+D3KlH52qPgMf6ZxbtgbvjlFaI9SW348T1qXNSvRk+BBt+RSId0jkZe7jo8zpvwNNC4Enr1DhRFFyAdJGuchXoyZMX8NYQFEsNjUdVt2laW73kCufE9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z6C6s+hbKzLzls1TzDOUGa/VBKD6fPJpPQUs3IQhwic=; b=pAt6tkeBHoUK/OoJHMaVFQEDLcxpoONvGEt0GegoI9cDQR4CltJvcVRLAhUr4tNQMpwO5A/vNFPzvdGU1AJnTpzGXmv0JdvsKTpoNKN64MDHe2kOif9nrex5wTYRpndtDpCa6mQhbK8f1Kk2aEaNH5bnjGD0hLgy87ExO7ODLlc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by DB8PR04MB6924.eurprd04.prod.outlook.com (2603:10a6:10:11e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.11; Wed, 25 Oct 2023 15:00:32 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::b21b:d65f:6b00:34a0]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::b21b:d65f:6b00:34a0%6]) with mapi id 15.20.6933.011; Wed, 25 Oct 2023 15:00:32 +0000 From: Iulia Tanasescu To: luiz.dentz@gmail.com Cc: andrei.istodorescu@nxp.com, claudia.rosu@nxp.com, iulia.tanasescu@nxp.com, linux-bluetooth@vger.kernel.org, mihai-octavian.urzica@nxp.com, silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com Subject: Re: [PATCH BlueZ 2/4] shared/bass: Handle G_IO_HUP on io channels Date: Wed, 25 Oct 2023 18:00:30 +0300 Message-Id: <20231025150030.3222-1-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VE1PR08CA0002.eurprd08.prod.outlook.com (2603:10a6:803:104::15) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|DB8PR04MB6924:EE_ X-MS-Office365-Filtering-Correlation-Id: 928b66e0-ae53-4e5e-060f-08dbd56b2281 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C2sHpenbddJCS+Jo9WguWgNuH0M/jBQweZs13k5YA3CS/eSS2UzUN4qrfr66Lim9Ly/CdG8a7LThL0bT2fd6f/jiJVY9+bseJDm7daK0uU/hfq6hrERGehByF70Tml/KVlhdvE19xiZCqM5sY2aSKwY+ltyxJWy/JTtSV8lFpwgvogiegeYsv/C+NU0kIP0Wpl1VkDlMDMIktZlbwk10nsVc23scokL/pO3OpzfhXplZeeNaa706UcRaX1WKT3UQ0AoA+k7GH5lTSNiPdjQLICv4ZWNSJPSb/mMuH23QkPSt5oOgEvsXaIaQbl72YtjvCLarRLBPjW8FLiW1oTMldkf4fUR2JfDWNECqEpu2sJ9uU5gk4Be8nN5g6zIoEdXPRLD57Wx3pD5py+iIWZOVUe2X8N2xI+oNbfHOBhjd8uKuvixSrpQp4d/JsOS6lEf84U4NYQu1flzAk4xvjN5iQo3Eu4Q2B37BswJxR4B5sxivHs2Zp3FZMCMurJHQlYwKtKD/XGPgwdUIQNyBD2hfIvsZWo2fPbIO+Xkl1Hy65uyWefjE/5YY4Qax94yw/0vQ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8898.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(39860400002)(396003)(346002)(136003)(366004)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(478600001)(6916009)(66946007)(66556008)(66476007)(26005)(1076003)(6512007)(2616005)(6506007)(6486002)(53546011)(36756003)(86362001)(8676002)(8936002)(44832011)(2906002)(41300700001)(5660300002)(38100700002)(316002)(4326008)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?DGToJ1FcIDqFt87HThYpoRg7YWlnaJEJtnrQiR6BrxM81pVRNz86qcqvD0aV?= =?us-ascii?Q?wsk1zFnjKXQ3ea09Npb+B9PUApEN7OHUTIJoby0mq1ci1ajmZWIWok5PuS5b?= =?us-ascii?Q?ZD8jfEiIVbQ2dHeFg2hPbQ8OxgNqiNsYqi/Uy7yN9Nh83woxizJ6joshFyEx?= =?us-ascii?Q?2AjAP/VsqTrOyr1139QEbV/+mn5Vc9o9BcTq1jV8ZzvvbXH9660sGEb1breF?= =?us-ascii?Q?9aLcIy7J+SwiAq+l8PsyjRCCL9h/lLI1CMqmsBrAOp36D5BR85SZrReOhwvF?= =?us-ascii?Q?iIqB+foS8MgMNXERDKfi7uSanTT4oG6/pnjEfMj9LmvZjnDN69D30fhGfa5K?= =?us-ascii?Q?B8yMznOgJGpxS1vFNvQ3VHEpQieoNuj4Ma+vgJ02qUAjrnMBezl6itPGush7?= =?us-ascii?Q?iMvj0fcfw70kv3y8pg2L2ekJop3fTEg9UaV78jStuAYPPLrarDat0sScmCl/?= =?us-ascii?Q?g5a23uJtq9xwYyqqWTWb8ezjv22MiKPvN9ZzVoTKsvQX5kZFDz9Y5REmX069?= =?us-ascii?Q?ehCWjGtazXpoxojrRwZSXQFpKw8W2onbBVZUQq6opLZWAXxmAfKpld0JI167?= =?us-ascii?Q?PjkGyjSZjz51ZcP0aQOWiOa6elEbw/svBe9Px954ne3kjDR1AfGepO8p4hHF?= =?us-ascii?Q?HWfZ9kjex2UVqU+8p9NtlNmvkfrIjSadtp8DY95n8vKa7NHtfKfsq7xCq6nl?= =?us-ascii?Q?Is2+37mAYW6Zh7bDdVxacOdvCISKiZoLxI4Lkzese/qcGa1mimvvaDXFOa0g?= =?us-ascii?Q?t9vOyZQ/nkmAvXcwwmCP0jfOAGM3/7J4tDZF3Ip8ulUC1h3J76SOErE4+Ohr?= =?us-ascii?Q?l7gnR4xo5cD4ycth3uobSpSgJ7a0E1cYG6KCoJh9sOtasUufR1dOJIecEsgE?= =?us-ascii?Q?JL8ljV2EM4pjOzemnfOzQmadQlA8Q5QNEIB3dZAqgZ42IjwFJxFgp07v9PnK?= =?us-ascii?Q?5BkiGNZvlhat+83VLu9rpde6rcqxTAxbQ9lWwJZcsgRH0p2A9xICZD/KV6ur?= =?us-ascii?Q?HOoAkY4Qwt0OmCLTDWjsM223saBXRae7BJRwY+eYs8bpyZDbKMJBOmot7KJ5?= =?us-ascii?Q?KOBFWYiwcFN/q7z45iy/yIbbRJERDOhUiyIRULy1TWdn0njx9WPqsHM8EorH?= =?us-ascii?Q?cty4U1Q/OfIohHmDeWroUrTWWvCErNj2WnMxdbdLak5g1EFWnS+VGvlTh7Gr?= =?us-ascii?Q?RO0d7hcFNOSVdq/JrijDGkYsq7jhtA5kC9z2L3ncHxXxcCWb6k6WdIETayrt?= =?us-ascii?Q?6vGpNiRVxY8y0/cadE4pop/yHyHsIXLqB0eBDOvVBCuMdLgWRRshg2penj7Y?= =?us-ascii?Q?1L8VLH2c/c0K4fXHq7WowMNK/S99w21WpE2yjgP658zarpaYX3Pw0hckSH9e?= =?us-ascii?Q?MScCObgw6nevCn0ORMhKMtoyFgYLiwYKNWIhHj9nvLN+VYz9V+NgD+oZEq2L?= =?us-ascii?Q?UOOSyvd1vRftU9+iiM5LPrzsWcTk/5EY9+us1DRsnfT7fQbT6Us+ZR6CyGar?= =?us-ascii?Q?M1Ce7GiBeaRbQrAf7TEZacaVNrSWNrMdd7tK3Mu/JTTtrbEb+oxGzNwH3c7+?= =?us-ascii?Q?mX5dIu+swfQ+L+ZpJJevhWAwhsW6AS34r8zBlTDXycIaGED4oOaWypSJ9+J1?= =?us-ascii?Q?7w=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 928b66e0-ae53-4e5e-060f-08dbd56b2281 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2023 15:00:32.1908 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qq3V2SKoMuP68g1to1XeyFN8nYEXBG4CTB2a92Xa0R/FspgIHB3zzrRaYXmQz3IDAJVDpR/NNNG9AG56R1LGAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6924 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 08:00:40 -0700 (PDT) Hi Luiz, > -----Original Message----- > From: Luiz Augusto von Dentz > Sent: Monday, October 16, 2023 8:05 PM > To: Iulia Tanasescu > Cc: linux-bluetooth@vger.kernel.org; Claudia Cristina Draghicescu > ; Mihai-Octavian Urzica octavian.urzica@nxp.com>; Silviu Florian Barbulescu > ; Vlad Pruteanu ; > Andrei Istodorescu > Subject: Re: [PATCH BlueZ 2/4] shared/bass: Handle G_IO_HUP on io > channels > > Hi Iulia, > > On Mon, Oct 16, 2023 at 8:49 AM Iulia Tanasescu > wrote: > > > > This adds watches to handle closed sockets > > > > --- > > src/shared/bass.c | 59 > > +++++++++++++++++++++++++++++++++++++++++++++++ > > src/shared/bass.h | 2 ++ > > 2 files changed, 61 insertions(+) > > > > diff --git a/src/shared/bass.c b/src/shared/bass.c index > > 0ee3187d1..78103d463 100644 > > --- a/src/shared/bass.c > > +++ b/src/shared/bass.c > > @@ -655,6 +655,11 @@ static void connect_cb(GIOChannel *io, GError > *gerr, > > g_io_channel_unref(bcast_src->listen_io); > > bcast_src->listen_io = NULL; > > > > + if (bcast_src->listen_io_id > 0) { > > + g_source_remove(bcast_src->listen_io_id); > > + bcast_src->listen_io_id = 0; > > + } > > + > > /* Close pa sync io */ > > if (bcast_src->pa_sync_io) { > > g_io_channel_shutdown(bcast_src->pa_sync_io, > > @@ -663,6 +668,11 @@ static void connect_cb(GIOChannel *io, GError > *gerr, > > bcast_src->pa_sync_io = NULL; > > } > > > > + if (bcast_src->pa_sync_io_id > 0) { > > + g_source_remove(bcast_src->pa_sync_io_id); > > + bcast_src->pa_sync_io_id = 0; > > + } > > + > > for (i = 0; i < bcast_src->num_subgroups; i++) > > bcast_src->subgroup_data[i].bis_sync = > > BT_BASS_BIG_SYNC_FAILED_BITMASK; @@ > > -703,6 +713,18 @@ static bool bass_trigger_big_sync(struct bt_bcast_src > *bcast_src) > > return false; > > } > > > > +static gboolean pa_sync_io_disconnect_cb(GIOChannel *io, > GIOCondition cond, > > + gpointer data) { > > + struct bt_bcast_src *bcast_src = data; > > + > > + DBG(bcast_src->bass, "PA sync io has been disconnected"); > > + > > + bcast_src->pa_sync_io_id = 0; > > + bcast_src->pa_sync_io = NULL; > > + > > + return FALSE; > > +} > > > > static void confirm_cb(GIOChannel *io, gpointer user_data) { @@ > > -726,6 +748,15 @@ static void confirm_cb(GIOChannel *io, gpointer > user_data) > > bcast_src->pa_sync_io = io; > > g_io_channel_ref(bcast_src->pa_sync_io); > > > > + if (bcast_src->pa_sync_io_id > 0) { > > + g_source_remove(bcast_src->pa_sync_io_id); > > + bcast_src->pa_sync_io_id = 0; > > + } > > + > > + bcast_src->pa_sync_io_id = g_io_add_watch(io, G_IO_ERR | > G_IO_HUP | > > + G_IO_NVAL, (GIOFunc) pa_sync_io_disconnect_cb, > > + bcast_src); > > + > > len = sizeof(qos); > > memset(&qos, 0, len); > > > > @@ -844,6 +875,19 @@ static bool > bass_validate_add_src_params(uint8_t *value, size_t len) > > return true; > > } > > > > +static gboolean listen_io_disconnect_cb(GIOChannel *io, GIOCondition > cond, > > + gpointer data) { > > + struct bt_bcast_src *bcast_src = data; > > + > > + DBG(bcast_src->bass, "Listen io has been disconnected"); > > + > > + bcast_src->listen_io_id = 0; > > + bcast_src->listen_io = NULL; > > + > > + return FALSE; > > +} > > + > > static void bass_handle_add_src_op(struct bt_bass *bass, > > struct gatt_db_attribute *attrib, > > uint8_t opcode, @@ -1023,6 > > +1067,11 @@ static void bass_handle_add_src_op(struct bt_bass *bass, > > bcast_src->listen_io = io; > > g_io_channel_ref(bcast_src->listen_io); > > > > + bcast_src->listen_io_id = g_io_add_watch(io, G_IO_ERR | > > + G_IO_HUP | G_IO_NVAL, > > + (GIOFunc)listen_io_disconnect_cb, > > + bcast_src); > > IO handling shall probably be kept outside of shared so we could emulate it > with use of socketpairs and unit test it, see how it was done for bap. > I submitted a patch to move all IO handling from src/shared to profiles/audio, similar to bap. > > if (num_bis > 0 && !bcast_src->bises) > > bcast_src->bises = queue_new(); > > } else { > > @@ -1318,11 +1367,21 @@ static void bass_bcast_src_free(void *data) > > g_io_channel_unref(bcast_src->listen_io); > > } > > > > + if (bcast_src->listen_io_id > 0) { > > + g_source_remove(bcast_src->listen_io_id); > > + bcast_src->listen_io_id = 0; > > + } > > + > > if (bcast_src->pa_sync_io) { > > g_io_channel_shutdown(bcast_src->pa_sync_io, TRUE, NULL); > > g_io_channel_unref(bcast_src->pa_sync_io); > > } > > > > + if (bcast_src->pa_sync_io_id > 0) { > > + g_source_remove(bcast_src->pa_sync_io_id); > > + bcast_src->pa_sync_io_id = 0; > > + } > > + > > queue_destroy(bcast_src->bises, bass_bis_unref); > > > > free(bcast_src); > > diff --git a/src/shared/bass.h b/src/shared/bass.h index > > c4b5b76ba..bd3fe900b 100644 > > --- a/src/shared/bass.h > > +++ b/src/shared/bass.h > > @@ -57,7 +57,9 @@ struct bt_bcast_src { > > uint8_t num_subgroups; > > struct bt_bass_subgroup_data *subgroup_data; > > GIOChannel *listen_io; > > + guint listen_io_id; > > GIOChannel *pa_sync_io; > > + guint pa_sync_io_id; > > struct queue *bises; > > }; > > > > -- > > 2.39.2 > > > > > -- > Luiz Augusto von Dentz Regards, Iulia