From 0212a969f6a96e575e2ffd0d3a3cfeb5d6712119 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 28 Jan 2014 09:14:44 -0800 Subject: [PATCH] android/AVDTP: Make stream channel priority 5 This makes channel priority 5 so it has higher priority than regular traffic but less than signalling channel. --- android/avdtp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/android/avdtp.c b/android/avdtp.c index e93ff70f4..178355573 100644 --- a/android/avdtp.c +++ b/android/avdtp.c @@ -2832,10 +2832,19 @@ gboolean avdtp_stream_set_transport(struct avdtp_stream *stream, int fd, size_t imtu, size_t omtu) { GIOChannel *io; + int priority; if (stream != stream->session->pending_open) return FALSE; + priority = 5; + if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &priority, + sizeof(priority)) < 0) { + error("setsockopt(SO_PRIORITY): %s (%d)", strerror(errno), + errno); + return FALSE; + } + io = g_io_channel_unix_new(fd); handle_transport_connect(stream->session, io, imtu, omtu); -- 2.47.3