Thread (4 messages) 4 messages, 3 authors, 2016-03-17

[PATCH] core/advertising: Fix byte order for MGMT_OP_ADD_ADVERTISING flags

flat view
STALE3859d

From: Andrejs Hanins <hidden>
Date: 2015-07-22 10:54:32
Subsystem: the rest · Maintainer: Linus Torvalds

Fix byte order for MGMT_OP_ADD_ADVERTISING flags
---
 src/advertising.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/advertising.c b/src/advertising.c
index d56b7a2..8c249d1 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -500,7 +500,7 @@ static DBusMessage *refresh_advertisement(struct advertisement *ad)
 		return btd_error_failed(ad->reg, "Failed");
 	}
 
-	cp->flags = flags;
+	cp->flags = htobl(flags);
 	cp->instance = ad->instance;
 	cp->adv_data_len = adv_data_len;
 	memcpy(cp->data, adv_data, adv_data_len);
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help