From 730c94647230f4a7aeb378ceafaf8299ebc025f4 Mon Sep 17 00:00:00 2001 From: Anurag Biradar Date: Mon, 1 Dec 2014 09:21:03 +0530 Subject: [PATCH] pbap: Fix When MaxListCount header missing As per spec(5.3.4.4) when MaxListCount headser is missing then PSE should assume MaxListCount value as MAX (65535) --- obexd/plugins/pbap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c index acac3aa71..4485b7d3b 100644 --- a/obexd/plugins/pbap.c +++ b/obexd/plugins/pbap.c @@ -454,6 +454,12 @@ static struct apparam_field *parse_aparam(const uint8_t *buffer, uint32_t hlen) param = g_new0(struct apparam_field, 1); + /* + * As per spec when client doesn't include MAXLISTCOUNT_TAG then it + * should be assume as Maximum value in vcardlisting 65535 + */ + param->maxlistcount = UINT16_MAX; + g_obex_apparam_get_uint8(apparam, ORDER_TAG, ¶m->order); g_obex_apparam_get_uint8(apparam, SEARCHATTRIB_TAG, ¶m->searchattrib); -- 2.47.3