Fix endian conversion for appparams in pbap client
PATCH 1/1 Fix endian conversion for appparams in pbap client
--- client/pbap.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
client/pbap.c +1 -0
@@ -312,6 +312,7 @@ static void read_return_apparam(struct session_data *session,if (hdr->len ==PHONEBOOKSIZE_LEN ) {guint16 val;memcpy (&val, hdr->val,sizeof (val)); + val =get_be16 (&val); *phone_book_size = val; }break ;
Signature · 1 line
1.7.5.rc3
Hi,
Quoted 9 lines · Bartosz Szatkowski
--- client/pbap.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)client/pbap.c +0
-0
client/pbap.c static void read_return_apparam(struct session_data *session, · line 318
Quoted 7 lines
client/pbap.c +1
-0@@ -312,6 +312,7 @@ static void read_return_apparam(struct session_data *session,if (hdr->len ==PHONEBOOKSIZE_LEN ) {guint16 val;memcpy (&val, hdr->val,sizeof (val)); + val =get_be16 (&val); *phone_book_size = val; }break ;
Two issues with this:
1. Fix your editor settings. You're using spaces instead of tabs for indentation.
2. Why not do *phone_book_size = get_be16(&val); directly?
Johan