diff mbox series

[BlueZ,2/3] avdtp: don't consider TX timestamps as errors

Message ID bf02f905a7c0bc13efde2ab7e057130fd4360cff.1744144760.git.pav@iki.fi
State New
Headers show
Series [BlueZ,1/3] shared/io: add watcher to be used with TX timestamping | expand

Commit Message

Pauli Virtanen April 8, 2025, 8:42 p.m. UTC
Use io_add_err_watch to avoid considering TX timestamps as errors in the
transport io channel.
---

Notes:
    v2:
    - use new API

 profiles/audio/avdtp.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index dd8458f20..17b8850ea 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
@@ -31,6 +31,7 @@ 
 #include "btio/btio.h"
 #include "src/btd.h"
 #include "src/log.h"
+#include "src/shared/io.h"
 #include "src/shared/timeout.h"
 #include "src/shared/util.h"
 #include "src/shared/queue.h"
@@ -749,8 +750,7 @@  static void stream_free(void *data)
 	g_free(stream);
 }
 
-static gboolean transport_cb(GIOChannel *chan, GIOCondition cond,
-				gpointer data)
+static void transport_cb(int cond, void *data)
 {
 	struct avdtp_stream *stream = data;
 	struct avdtp_local_sep *sep = stream->lsep;
@@ -766,8 +766,6 @@  static gboolean transport_cb(GIOChannel *chan, GIOCondition cond,
 
 	if (!stream->abort_int)
 		avdtp_sep_set_state(stream->session, sep, AVDTP_STATE_IDLE);
-
-	return FALSE;
 }
 
 static int get_send_buffer_size(int sk)
@@ -866,8 +864,7 @@  proceed:
 
 	avdtp_sep_set_state(session, sep, AVDTP_STATE_OPEN);
 
-	stream->io_id = g_io_add_watch(io, G_IO_ERR | G_IO_HUP | G_IO_NVAL,
-					(GIOFunc) transport_cb, stream);
+	stream->io_id = io_glib_add_err_watch(io, transport_cb, stream);
 
 	/* Release pending IO */
 	if (session->pending_open_io) {