Diff between b19d445b01920ba5ffdcbe320d406cd5ddac8746 and 0e831d8e67096eacfe9870f8d8c1134fc0b045d3

Changed Files

File Additions Deletions Status
profiles/audio/avdtp.c +3 -6 modified

Full Patch

diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index dd8458f..17b8850 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) {