From 3b6f4afa8c8b852d0ed09ed06b5067701ede0cb8 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 20 Jun 2012 14:27:49 -0300 Subject: [PATCH] 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. --- thermometer/thermometer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c index 914f77c7b..087662eff 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; -- 2.47.3