[PATCH BlueZ 02/10] dis: Reduce array size for PnP ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PnP_ID characteristic is a 7 octets value which includes Vendor ID
source, a Vendor ID, Product ID, and Product Version.
---
 deviceinfo/deviceinfo.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/deviceinfo/deviceinfo.c b/deviceinfo/deviceinfo.c
index 41fc3fc..4548553 100644
--- a/deviceinfo/deviceinfo.c
+++ b/deviceinfo/deviceinfo.c
@@ -37,6 +37,8 @@
 #include "log.h"
 #include "deviceinfo.h"
 
+#define PNP_ID_SIZE	7
+
 struct deviceinfo {
 	struct btd_device	*dev;		/* Device reference */
 	GAttrib			*attrib;	/* GATT connection */
@@ -84,7 +86,7 @@ static void read_pnpid_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[PNP_ID_SIZE];
 	ssize_t vlen;
 
 	if (status != 0) {
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux