Diff between fd0e49cb2329142be743726907efd8c0d92fd338 and 44b7bcd6c1acdc421d83e37efddf0b372cbc8c75

Changed Files

File Additions Deletions Status
audio/avdtp.c +10 -0 modified

Full Patch

diff --git a/audio/avdtp.c b/audio/avdtp.c
index 24372a5..c2aeeec 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -878,6 +878,7 @@ static void handle_transport_connect(struct avdtp *session, GIOChannel *io,
 	struct avdtp_stream *stream = session->pending_open;
 	struct avdtp_local_sep *sep = stream->lsep;
 	int sk, buf_size, min_buf_size;
+	GError *err = NULL;
 
 	session->pending_open = NULL;
 
@@ -906,6 +907,15 @@ static void handle_transport_connect(struct avdtp *session, GIOChannel *io,
 	if (sep->info.type != AVDTP_SEP_TYPE_SOURCE)
 		goto proceed;
 
+	bt_io_set(stream->io, BT_IO_L2CAP, &err,
+					BT_IO_OPT_FLUSHABLE, TRUE,
+					BT_IO_OPT_INVALID);
+	if (err != NULL) {
+		error("Enabling flushable packets failed: %s", err->message);
+		g_error_free(err);
+	} else
+		DBG("Flushable packets enabled");
+
 	sk = g_io_channel_unix_get_fd(stream->io);
 	buf_size = get_send_buffer_size(sk);
 	if (buf_size < 0)