Hi Amisha, On Mon, Oct 28, 2024 at 7:10 AM Amisha Jain <quic_amisjain@xxxxxxxxxxx> 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 > > For all the GET phonebook request sent by PTS has no extra params > added in it, therefore PBAP server is rejecting the request > by sending 'Bad Request' as response. > So appending few default params in GET request to avoid > testcase failure. > > --- > obexd/plugins/pbap.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c > index 4175f9de8..3c23815ba 100644 > --- a/obexd/plugins/pbap.c > +++ b/obexd/plugins/pbap.c > @@ -524,6 +524,11 @@ static int pbap_get(struct obex_session *os, void *user_data) > }; > buffer = default_apparams; > rsize = sizeof(default_apparams); > + } else if (!rsize && g_ascii_strcasecmp(type, PHONEBOOK_TYPE) == 0) { Hmm, where do these values come from though? Are they defined in the PBAP spec, if they are then we can probably quote the spec. > + static const uint8_t default_apparams[] = { > + 0x04, 0x02, 0xff, 0xff }; > + buffer = default_apparams; > + rsize = sizeof(default_apparams); > } > > params = parse_aparam(buffer, rsize); > -- > 2.34.1 > > -- Luiz Augusto von Dentz