Thread (5 messages) 5 messages, 2 authors, 2012-08-13
STALE5092d

[PATCH BlueZ] mgmtops: Fix endianness conversion

From: Anderson Lizardo <hidden>
Date: 2012-07-30 18:13:25
Subsystem: the rest · Maintainer: Linus Torvalds

Flags field has 32-bit size. Same issue was fixed for mgmtops in
1801a4d45d74c29cebacaab79a07e9961300be41.
---
 monitor/control.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor/control.c b/monitor/control.c
index 159ba9d..54b249d 100644
--- a/monitor/control.c
+++ b/monitor/control.c
@@ -210,7 +210,7 @@ static void mgmt_device_connected(uint16_t len, const void *buf)
 		return;
 	}
 
-	flags = btohs(ev->flags);
+	flags = btohl(ev->flags);
 	ba2str(&ev->addr.bdaddr, str);
 
 	printf("@ Device Connected: %s (%d) flags 0x%4.4x\n",
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help