aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2012-06-12 13:51:50 -0300
committerJoão Paulo Rechi Vita <jprvita@openbossa.org>2012-06-19 14:00:52 -0300
commite15aceb86c8563f90319f31d690ebbb849fd7020 (patch)
treed27074bbea0d2bb77a01052e1ee18ed9e14e3238
parent60f7cfb20840dddfb0343cbf1c45d2526f308598 (diff)
downloadbluez-e15aceb86c8563f90319f31d690ebbb849fd7020.tar.gz
bluez-e15aceb86c8563f90319f31d690ebbb849fd7020.tar.xz
bluez-e15aceb86c8563f90319f31d690ebbb849fd7020.zip
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.
-rw-r--r--proximity/monitor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/proximity/monitor.c b/proximity/monitor.c
index 2645321b..f22d6f4e 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) {