[PATCH BlueZ] mgmtops: Fix endianness conversion

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

Flags field has 32-bit size.
 plugins/mgmtops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index 22fa329..cedfbd4 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
@@ -1550,7 +1550,7 @@ static void mgmt_device_found(int sk, uint16_t index, void *buf, size_t len)
 		eir = ev->eir;
-	flags = btohs(ev->flags);
+	flags = btohl(ev->flags);
 	ba2str(&ev->addr.bdaddr, addr);
 	DBG("hci%u addr %s, rssi %d flags 0x%04x eir_len %u",

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

[Bluez Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Bluez Devel]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]

Add to Google Powered by Linux