Skip to contentSkip to conversation

Fix endian conversion for appparams in pbap client

PATCH In review Bartosz Szatkowski 2 participants 2 messages May 15, 2011 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fix endian conversion for appparams in pbap client

---
 client/pbap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
client/pbap.c +1 -1
index 837419c..589b1ca 100644
@@ -312,7 +312,7 @@ static void read_return_apparam(struct session_data *session,
 			if (hdr->len == PHONEBOOKSIZE_LEN) {
 				guint16 val;
 				memcpy(&val, hdr->val, sizeof(val));
-				*phone_book_size = val;
+				*phone_book_size = get_be16(&val);
 			}
 			break;
 		case NEWMISSEDCALLS_TAG:
Signature · 1 line
1.7.5.rc3
#1 lore raw

Hi Bartosz,

Quoted 9 lines · Bartosz Szatkowski
---
 client/pbap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
client/pbap.c +0 -0
index 837419c..589b1ca 100644

client/pbap.c static void read_return_apparam(struct session_data *session, · line 318

Quoted 8 lines
client/pbap.c +1 -1
@@ -312,7 +312,7 @@ static void read_return_apparam(struct session_data *session,
 			if (hdr->len == PHONEBOOKSIZE_LEN) {
 				guint16 val;
 				memcpy(&val, hdr->val, sizeof(val));
-				*phone_book_size = val;
+				*phone_book_size = get_be16(&val);
 			}
 			break;
 		case NEWMISSEDCALLS_TAG:

Pushed upstream. Thanks.

Johan