aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2012-06-12 13:33:34 -0300
committerJoão Paulo Rechi Vita <jprvita@openbossa.org>2012-06-19 14:00:51 -0300
commit99cc3974c13fe3b66e701f5723e6f737a50ffca4 (patch)
tree93c0cd34ebd48cffcc6ad801ab7aabd73c981fcc
parent871196495a01a9d47fd138c8a109b91319aa38b7 (diff)
downloadbluez-99cc3974c13fe3b66e701f5723e6f737a50ffca4.tar.gz
bluez-99cc3974c13fe3b66e701f5723e6f737a50ffca4.tar.xz
bluez-99cc3974c13fe3b66e701f5723e6f737a50ffca4.zip
thermometer: Reduce the array for Valid Range
Valid Range descriptor contains two unsigned 16-bits integers representing the valid range of values that the Measurement Interval characteristic can support.
-rw-r--r--thermometer/thermometer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index c2256b69..614da183 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;