Valid Range descriptor contains two unsigned 16-bits integers representing the valid range of values that the Measurement Interval characteristic can support. --- thermometer/thermometer.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c index c2256b6..614da18 100644 --- a/thermometer/thermometer.c +++ b/thermometer/thermometer.c @@ -48,6 +48,8 @@ #define FLOAT_MAX_MANTISSA 16777216 /* 2^24 */ +#define VALID_RANGE_DESC_SIZE 4 + struct thermometer { DBusConnection *conn; /* The connection to the bus */ struct btd_device *dev; /* Device reference */ @@ -297,7 +299,7 @@ static void valid_range_desc_cb(guint8 status, const guint8 *pdu, guint16 len, gpointer user_data) { struct descriptor *desc = user_data; - uint8_t value[ATT_MAX_MTU]; + uint8_t value[VALID_RANGE_DESC_SIZE]; uint16_t max, min; ssize_t vlen; -- 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