summaryrefslogtreecommitdiff
path: root/tools/test-server.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2012-02-02 13:57:07 -0800
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-02 15:56:07 -0800
commite2ae29cf15a1e490de3a61102834f169ba21be5b (patch)
treeb17a73c3c52a5cd41722d2e9a810acb6f2c29ed8 /tools/test-server.c
parentbf77bc2740a2ea18edbbce074e9e46df30dbc4bf (diff)
downloadobexd-e2ae29cf15a1e490de3a61102834f169ba21be5b.tar.gz
tools: Fix test-server to use ERTM while on packet mode
OBEX should only be used with ERTM over L2CAP and set MTU properly
Diffstat (limited to 'tools/test-server.c')
-rw-r--r--tools/test-server.c17
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);