[PATCH BlueZ 2/4] android/AVDTP: Make stream channel priority 5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

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 4cfffc8..23fe519 100644
--- a/android/avdtp.c
+++ b/android/avdtp.c
@@ -2833,10 +2833,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);
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux