Diff between 26ce1d484f62a82455c9b5ee09b8bdb62ad2e426 and 9e1e47425e1eea7f6300a653fae62ce8ca435eca

Changed Files

File Additions Deletions Status
tools/obex-server-tool.c +14 -3 modified

Full Patch

diff --git a/tools/obex-server-tool.c b/tools/obex-server-tool.c
index 07d1328..74d553a 100644
--- a/tools/obex-server-tool.c
+++ b/tools/obex-server-tool.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);