aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2012-06-12 13:45:45 -0300
committerJoão Paulo Rechi Vita <jprvita@openbossa.org>2012-06-19 14:00:52 -0300
commit60f7cfb20840dddfb0343cbf1c45d2526f308598 (patch)
treef3114e75eeeca80e09ffcae3ace004f4f53dc0d8
parent81fdb71b9be05865c0336c0039deb608a8714a20 (diff)
downloadbluez-60f7cfb20840dddfb0343cbf1c45d2526f308598.tar.gz
bluez-60f7cfb20840dddfb0343cbf1c45d2526f308598.tar.xz
bluez-60f7cfb20840dddfb0343cbf1c45d2526f308598.zip
thermometer: Reduce array size for Measurement Interval
Measurement Interval is a 16-bits value characteristic used to enable and control the interval between consecutive temperature measurements.
-rw-r--r--thermometer/thermometer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c
index 914f77c7..087662ef 100644
--- a/thermometer/thermometer.c
+++ b/thermometer/thermometer.c
@@ -50,6 +50,7 @@
#define VALID_RANGE_DESC_SIZE 4
#define TEMPERATURE_TYPE_SIZE 1
+#define MEASUREMENT_INTERVAL_SIZE 2
struct thermometer {
DBusConnection *conn; /* The connection to the bus */
@@ -474,7 +475,7 @@ static void read_interval_cb(guint8 status, const guint8 *pdu, guint16 len,
gpointer user_data)
{
struct characteristic *ch = user_data;
- uint8_t value[ATT_MAX_MTU];
+ uint8_t value[MEASUREMENT_INTERVAL_SIZE];
uint16_t interval;
ssize_t vlen;