From 4b7da0b91d6b7704fe94541c7a39a253d0d661a8 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Thu, 7 Apr 2011 14:31:48 -0300 Subject: [PATCH] Add workaround to skip wrong OMTU for basic rate This patch is required until the MTU kernel patch is integrated. Without it the kernel returns zero for basic rate OMTU. --- attrib/gattrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attrib/gattrib.c b/attrib/gattrib.c index 290cd9672..8c15e52af 100644 --- a/attrib/gattrib.c +++ b/attrib/gattrib.c @@ -409,7 +409,7 @@ GAttrib *g_attrib_new(GIOChannel *io) if (bt_io_get(attrib->io, BT_IO_L2CAP, NULL, BT_IO_OPT_OMTU, &omtu, BT_IO_OPT_INVALID)) { - if (omtu > ATT_MAX_MTU) + if (omtu == 0 || omtu > ATT_MAX_MTU) omtu = ATT_MAX_MTU; } else omtu = ATT_DEFAULT_LE_MTU; -- 2.47.3