[PATCH obexd 3/3] tools: Fix test-server to use ERTM while on packet mode

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

 



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

OBEX should only be used with ERTM over L2CAP and set MTU properly
---
 tools/test-server.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/tools/test-server.c b/tools/test-server.c
index 07d1328..74d553a 100644
--- a/tools/test-server.c
+++ b/tools/test-server.c
@@ -331,9 +331,20 @@ static guint bluetooth_listen(void)
 		option = BT_IO_OPT_CHANNEL;
 	}
 
-	io = bt_io_listen(type, bluetooth_accept, NULL, NULL, NULL, &err,
-				option, option_channel,
-				BT_IO_OPT_INVALID);
+	if (type == BT_IO_L2CAP)
+		io = bt_io_listen(type, bluetooth_accept, NULL, NULL,
+					NULL, &err,
+					option, option_channel,
+					BT_IO_OPT_MODE, BT_IO_MODE_ERTM,
+					BT_IO_OPT_OMTU, option_omtu,
+					BT_IO_OPT_IMTU, option_imtu,
+					BT_IO_OPT_INVALID);
+	else
+		io = bt_io_listen(type, bluetooth_accept, NULL, NULL,
+					NULL, &err,
+					option, option_channel,
+					BT_IO_OPT_INVALID);
+
 	if (io == NULL) {
 		g_printerr("%s\n", err->message);
 		g_error_free(err);
-- 
1.7.7.6

--
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