public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] iso-tester: fix missing clear of io_id in callbacks
@ 2026-03-29 12:23 Pauli Virtanen
  2026-03-29 13:34 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Pauli Virtanen @ 2026-03-29 12:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Fixes issues

GLib-CRITICAL **: Source ID 126 was not found when attempting to remove it
---
 tools/iso-tester.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index b851d2cd8..4c30e9951 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -3278,9 +3278,13 @@ fail:
 
 static gboolean test_listen_past(gpointer user_data)
 {
-	struct test_data *data = tester_get_data();
+	struct test_data *data = user_data;
 	struct bthost *host;
 
+	tester_print("Host initiates PAST");
+
+	data->io_id[3] = 0;
+
 	host = hciemu_client_get_host(data->hciemu);
 	bthost_past_set_info(host, data->acl_handle);
 
@@ -3343,7 +3347,8 @@ static void setup_listen_many(struct test_data *data, uint8_t n, uint8_t *num,
 		/* Wait for listen to take effect before initiating PAST
 		 * procedure.
 		 */
-		data->io_id[i] = g_timeout_add(250, test_listen_past, data);
+		g_assert(data->io_id[3] == 0);
+		data->io_id[3] = g_timeout_add(250, test_listen_past, data);
 	}
 }
 
@@ -3583,6 +3588,8 @@ static gboolean test_connect2_busy_done(gpointer user_data)
 {
 	struct test_data *data = tester_get_data();
 
+	data->io_id[1] = 0;
+
 	if (data->io_id[0] > 0) {
 		/* First connection still exists */
 		g_source_remove(data->io_id[0]);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-29 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-29 12:23 [PATCH BlueZ] iso-tester: fix missing clear of io_id in callbacks Pauli Virtanen
2026-03-29 13:34 ` [BlueZ] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox