This patch fix unneeded discover characteristics transaction when the last characteristic declaration contains the handle number equals to the end handle of the primary service. --- attrib/gatt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/attrib/gatt.c b/attrib/gatt.c index b9c2bbb..6f9a11d 100644 --- a/attrib/gatt.c +++ b/attrib/gatt.c @@ -303,7 +303,7 @@ static void char_discovered_cb(guint8 status, const guint8 *ipdu, guint16 iplen, att_data_list_free(list); err = 0; - if (last != 0) { + if (last != 0 && (last + 1 < dc->end)) { buf = g_attrib_get_buffer(dc->attrib, &buflen); bt_uuid16_create(&uuid, GATT_CHARAC_UUID); -- 1.7.8.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