diff options
author | Hannu Mallat <hannu.mallat@jollamobile.com> | 2014-02-03 09:47:49 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-02-05 13:19:06 +0200 |
commit | 286216b9a88e3e0c245039efe56a2bd5c4b69f4b (patch) | |
tree | fc213109c5cc89f9f39c61b778941bf63db6fadd /obexd/plugins | |
parent | 5ca0c401efcb1b22e2d43591736b9b3b2f4bb228 (diff) | |
download | bluez-286216b9a88e3e0c245039efe56a2bd5c4b69f4b.tar.gz |
pbap: Fix PhonebookSize endianness
As g_obex_apparam_set_uint16() converts data to big-endian format
internally, do not call htons() prior to it.
Diffstat (limited to 'obexd/plugins')
-rw-r--r-- | obexd/plugins/pbap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c index 47401889d..acac3aa71 100644 --- a/obexd/plugins/pbap.c +++ b/obexd/plugins/pbap.c @@ -188,7 +188,7 @@ static void phonebook_size_result(const char *buffer, size_t bufsize, DBG("vcards %d", vcards); - phonebooksize = htons(vcards); + phonebooksize = vcards; pbap->obj->apparam = g_obex_apparam_set_uint16(NULL, PHONEBOOKSIZE_TAG, phonebooksize); @@ -365,7 +365,7 @@ static int generate_response(void *user_data) if (max == 0) { /* Ignore all other parameter and return PhoneBookSize */ - uint16_t size = htons(g_slist_length(pbap->cache.entries)); + uint16_t size = g_slist_length(pbap->cache.entries); pbap->obj->apparam = g_obex_apparam_set_uint16( pbap->obj->apparam, |