diff mbox series

[v1] obex: Add Newmissedcalls tag in PBAP GET response

Message ID 20241111125518.2039073-1-quic_amisjain@quicinc.com
State New
Headers show
Series [v1] obex: Add Newmissedcalls tag in PBAP GET response | expand

Commit Message

Amisha Jain (QUIC) Nov. 11, 2024, 12:55 p.m. UTC
This fix is required for passing below PTS testcases:

1. PBAP/PSE/PBD/BV-05-C
2. PBAP/PSE/PBD/BV-17-C
3. PBAP/PSE/PBB/BV-11-C

Even if the new missed calls value is zero, send it in GET response.
As per the PBAP spec, it is mandatory to include Newmissedcalls
tag in response incase of object name is 'mch.vcf' or 'cch.vcf'.
It will be better to include it in all GET response.

---
 obexd/plugins/pbap.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 64641c798..74976890d 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -184,12 +184,11 @@  static void phonebook_size_result(const char *buffer, size_t bufsize,
 
 	if (missed > 0)	{
 		DBG("missed %d", missed);
+	}
 
-		pbap->obj->apparam = g_obex_apparam_set_uint16(
-							pbap->obj->apparam,
+	pbap->obj->apparam = g_obex_apparam_set_uint16(pbap->obj->apparam,
 							NEWMISSEDCALLS_TAG,
 							missed);
-	}
 
 	obex_object_set_io_flags(pbap->obj, G_IO_IN, 0);
 }
@@ -223,12 +222,11 @@  static void query_result(const char *buffer, size_t bufsize, int vcards,
 		DBG("missed %d", missed);
 
 		pbap->obj->firstpacket = TRUE;
+	}
 
-		pbap->obj->apparam = g_obex_apparam_set_uint16(
-							pbap->obj->apparam,
+	pbap->obj->apparam = g_obex_apparam_set_uint16(pbap->obj->apparam,
 							NEWMISSEDCALLS_TAG,
 							missed);
-	}
 
 	obex_object_set_io_flags(pbap->obj, G_IO_IN, 0);
 }