aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2012-06-12 13:38:30 -0300
committerJoão Paulo Rechi Vita <jprvita@openbossa.org>2012-06-19 14:00:51 -0300
commit81fdb71b9be05865c0336c0039deb608a8714a20 (patch)
tree4d7b3339ebc1a8188b53af53cdf81648e0c0282e
parent99cc3974c13fe3b66e701f5723e6f737a50ffca4 (diff)
downloadbluez-81fdb71b9be05865c0336c0039deb608a8714a20.tar.gz
bluez-81fdb71b9be05865c0336c0039deb608a8714a20.tar.xz
bluez-81fdb71b9be05865c0336c0039deb608a8714a20.zip
thermometer: Reduce the array for temperature type
Temperature Type characteristic is a 8-bits value used to describe the type of temperature measurement in relation to the location on the human body.
-rw-r--r--thermometer/thermometer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index 614da183..914f77c7 100644
--- a/thermometer/thermometer.c
+++ b/thermometer/thermometer.c
@@ -49,6 +49,7 @@
#define FLOAT_MAX_MANTISSA 16777216 /* 2^24 */
#define VALID_RANGE_DESC_SIZE 4
+#define TEMPERATURE_TYPE_SIZE 1
struct thermometer {
DBusConnection *conn; /* The connection to the bus */
@@ -445,7 +446,7 @@ static void read_temp_type_cb(guint8 status, const guint8 *pdu, guint16 len,
{
struct characteristic *ch = user_data;
struct thermometer *t = ch->t;
- uint8_t value[ATT_MAX_MTU];
+ uint8_t value[TEMPERATURE_TYPE_SIZE];
ssize_t vlen;
if (status != 0) {