* [PATCH v1] obex: Fix the PBAP GET request in PTS testing
@ 2024-11-11 11:16 Amisha Jain
2024-11-11 13:02 ` [v1] " bluez.test.bot
2024-11-11 15:20 ` [PATCH v1] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Amisha Jain @ 2024-11-11 11:16 UTC (permalink / raw)
To: linux-bluetooth; +Cc: quic_mohamull, quic_hbandi, quic_anubhavg
This change is required for passing below PTS testcases:
1. PBAP/PSE/PBD/BV-02-C
2. PBAP/PSE/PBD/BV-03-C
3. PBAP/PSE/PBD/BI-01-C
4. PBAP/PSE/PBD/BV-13-C
5. PBAP/PSE/PBD/BV-14-C
6. PBAP/PSE/PBD/BV-17-C
PTS sends all the GET phonebook requests without extra params.
Therefore, the PBAP server is rejecting the requests with a
'Bad Request' response.
So append 'maxlistcount' as default param in GET request to
avoid testcase failure.
---
obexd/plugins/pbap.c | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 4175f9de8..64641c798 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -438,10 +438,6 @@ static struct apparam_field *parse_aparam(const uint8_t *buffer, uint32_t hlen)
GObexApparam *apparam;
struct apparam_field *param;
- apparam = g_obex_apparam_decode(buffer, hlen);
- if (apparam == NULL)
- return NULL;
-
param = g_new0(struct apparam_field, 1);
/*
@@ -449,25 +445,28 @@ static struct apparam_field *parse_aparam(const uint8_t *buffer, uint32_t hlen)
* 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,
+ apparam = g_obex_apparam_decode(buffer, hlen);
+ if (apparam) {
+ g_obex_apparam_get_uint8(apparam, ORDER_TAG, ¶m->order);
+ g_obex_apparam_get_uint8(apparam, SEARCHATTRIB_TAG,
¶m->searchattrib);
- g_obex_apparam_get_uint8(apparam, FORMAT_TAG, ¶m->format);
- g_obex_apparam_get_uint16(apparam, MAXLISTCOUNT_TAG,
+ g_obex_apparam_get_uint8(apparam, FORMAT_TAG, ¶m->format);
+ g_obex_apparam_get_uint16(apparam, MAXLISTCOUNT_TAG,
¶m->maxlistcount);
- g_obex_apparam_get_uint16(apparam, LISTSTARTOFFSET_TAG,
+ g_obex_apparam_get_uint16(apparam, LISTSTARTOFFSET_TAG,
¶m->liststartoffset);
- g_obex_apparam_get_uint64(apparam, FILTER_TAG, ¶m->filter);
- param->searchval = g_obex_apparam_get_string(apparam, SEARCHVALUE_TAG);
+ g_obex_apparam_get_uint64(apparam, FILTER_TAG, ¶m->filter);
+ param->searchval = g_obex_apparam_get_string(apparam,
+ SEARCHVALUE_TAG);
+
+ g_obex_apparam_free(apparam);
+ }
DBG("o %x sa %x sv %s fil %" G_GINT64_MODIFIER "x for %x max %x off %x",
param->order, param->searchattrib, param->searchval,
param->filter, param->format, param->maxlistcount,
param->liststartoffset);
- g_obex_apparam_free(apparam);
-
return param;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [v1] obex: Fix the PBAP GET request in PTS testing
2024-11-11 11:16 [PATCH v1] obex: Fix the PBAP GET request in PTS testing Amisha Jain
@ 2024-11-11 13:02 ` bluez.test.bot
2024-11-11 15:20 ` [PATCH v1] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-11-11 13:02 UTC (permalink / raw)
To: linux-bluetooth, quic_amisjain
[-- Attachment #1: Type: text/plain, Size: 949 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=908365
---Test result---
Test Summary:
CheckPatch PASS 0.47 seconds
GitLint PASS 0.33 seconds
BuildEll PASS 24.95 seconds
BluezMake PASS 1688.10 seconds
MakeCheck PASS 13.07 seconds
MakeDistcheck PASS 183.09 seconds
CheckValgrind PASS 255.34 seconds
CheckSmatch PASS 362.03 seconds
bluezmakeextell PASS 123.68 seconds
IncrementalBuild PASS 1435.02 seconds
ScanBuild PASS 1020.19 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] obex: Fix the PBAP GET request in PTS testing
2024-11-11 11:16 [PATCH v1] obex: Fix the PBAP GET request in PTS testing Amisha Jain
2024-11-11 13:02 ` [v1] " bluez.test.bot
@ 2024-11-11 15:20 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-11-11 15:20 UTC (permalink / raw)
To: Amisha Jain; +Cc: linux-bluetooth, quic_mohamull, quic_hbandi, quic_anubhavg
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 11 Nov 2024 16:46:25 +0530 you wrote:
> This change is required for passing below PTS testcases:
> 1. PBAP/PSE/PBD/BV-02-C
> 2. PBAP/PSE/PBD/BV-03-C
> 3. PBAP/PSE/PBD/BI-01-C
> 4. PBAP/PSE/PBD/BV-13-C
> 5. PBAP/PSE/PBD/BV-14-C
> 6. PBAP/PSE/PBD/BV-17-C
>
> [...]
Here is the summary with links:
- [v1] obex: Fix the PBAP GET request in PTS testing
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=b22bbf873f81
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-11 15:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 11:16 [PATCH v1] obex: Fix the PBAP GET request in PTS testing Amisha Jain
2024-11-11 13:02 ` [v1] " bluez.test.bot
2024-11-11 15:20 ` [PATCH v1] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).