Diff between 827ba0ce19d157757e115f815e4ffef303153ec7 and 4b7da0b91d6b7704fe94541c7a39a253d0d661a8

Changed Files

File Additions Deletions Status
attrib/gattrib.c +1 -1 modified

Full Patch

diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index 290cd96..8c15e52 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;