From db25f7c6fa1a6b5bb470e4c74fbe404c571a4f84 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 20 Jun 2012 14:27:50 -0300 Subject: [PATCH] proximity: Reduce array size for Tx Power Level Tx Power Level characteristic is a signed 8-bits integer which reports the current transmit power level. --- proximity/monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proximity/monitor.c b/proximity/monitor.c index 2645321bb..f22d6f4eb 100644 --- a/proximity/monitor.c +++ b/proximity/monitor.c @@ -55,6 +55,7 @@ #define POWER_LEVEL_CHR_UUID 0x2A07 #define IMMEDIATE_TIMEOUT 5 +#define TX_POWER_SIZE 1 enum { ALERT_NONE = 0, @@ -211,7 +212,7 @@ static int write_alert_level(struct monitor *monitor) static void tx_power_read_cb(guint8 status, const guint8 *pdu, guint16 plen, gpointer user_data) { - uint8_t value[ATT_MAX_MTU]; + uint8_t value[TX_POWER_SIZE]; ssize_t vlen; if (status != 0) { -- 2.47.3