* [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting
@ 2026-10-27 7:10 Jinwang Li
2026-10-27 7:10 ` [PATCH v2 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jinwang Li @ 2026-10-27 7:10 UTC (permalink / raw)
To: linux-bluetooth
Cc: cheng.jiang, quic_chezhou, wei.deng, shuai.zhang, mengshi.wu,
jinwang.li, xiuzhuo.shang
This series fixes NewMissedCalls reporting in obexd PBAP.
The first patch fixes the apparam encoding: NewMissedCalls is a
one-byte value but was encoded as uint16. The second patch makes the
dummy backend report the actual missed-call count for the mch folder
instead of always zero, which is required by PTS PBAP/PSE/PBD/BV-05-C.
Changes in v2:
- Fix checkpatch LONG_LINE warning.
- Link to v1:
https://lore.kernel.org/all/20261026131504.1016687-1-jinwang.li@oss.qualcomm.com/
Jinwang Li (2):
obexd/pbap: Fix NewMissedCalls parameter size
obexd/pbap: Report NewMissedCalls for mch
obexd/plugins/irmc.c | 4 ++--
obexd/plugins/pbap.c | 8 ++++----
obexd/plugins/phonebook-dummy.c | 23 ++++++++++++++++++++++-
obexd/plugins/phonebook-tracker.c | 2 +-
obexd/plugins/phonebook.h | 2 +-
5 files changed, 30 insertions(+), 9 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] obexd/pbap: Fix NewMissedCalls parameter size
2026-10-27 7:10 [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting Jinwang Li
@ 2026-10-27 7:10 ` Jinwang Li
2026-10-27 9:01 ` obexd/pbap: Fix NewMissedCalls reporting bluez.test.bot
2026-10-27 7:10 ` [PATCH v2 2/2] obexd/pbap: Report NewMissedCalls for mch Jinwang Li
2026-10-28 13:30 ` [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting patchwork-bot+bluetooth
2 siblings, 1 reply; 5+ messages in thread
From: Jinwang Li @ 2026-10-27 7:10 UTC (permalink / raw)
To: linux-bluetooth
Cc: cheng.jiang, quic_chezhou, wei.deng, shuai.zhang, mengshi.wu,
jinwang.li, xiuzhuo.shang
NewMissedCalls is a one-byte apparam, but was encoded with
g_obex_apparam_set_uint16(). Use uint8 instead, and update the
phonebook callback type to match.
Fixes: 398d3e23533a ("obexd: Make use of GObexApparam API")
Signed-off-by: Jinwang Li <jinwang.li@oss.qualcomm.com>
---
obexd/plugins/irmc.c | 4 ++--
obexd/plugins/pbap.c | 8 ++++----
obexd/plugins/phonebook-tracker.c | 2 +-
obexd/plugins/phonebook.h | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/obexd/plugins/irmc.c b/obexd/plugins/irmc.c
index cfd8a45d4..b9888bbed 100644
--- a/obexd/plugins/irmc.c
+++ b/obexd/plugins/irmc.c
@@ -74,7 +74,7 @@ static const char *owner_vcard =
"END:VCARD\r\n";
static void phonebook_size_result(const char *buffer, size_t bufsize,
- int vcards, int missed,
+ int vcards, uint8_t missed,
gboolean lastpart, void *user_data)
{
struct irmc_session *irmc = user_data;
@@ -90,7 +90,7 @@ static void phonebook_size_result(const char *buffer, size_t bufsize,
}
static void query_result(const char *buffer, size_t bufsize, int vcards,
- int missed, gboolean lastpart, void *user_data)
+ uint8_t missed, gboolean lastpart, void *user_data)
{
struct irmc_session *irmc = user_data;
const char *s, *t;
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 9f8684863..3ee54f1fe 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -159,7 +159,7 @@ static void cache_clear(struct cache *cache)
}
static void phonebook_size_result(const char *buffer, size_t bufsize,
- int vcards, int missed,
+ int vcards, uint8_t missed,
gboolean lastpart, void *user_data)
{
struct pbap_session *pbap = user_data;
@@ -186,7 +186,7 @@ static void phonebook_size_result(const char *buffer, size_t bufsize,
DBG("missed %d", missed);
}
- pbap->obj->apparam = g_obex_apparam_set_uint16(pbap->obj->apparam,
+ pbap->obj->apparam = g_obex_apparam_set_uint8(pbap->obj->apparam,
NEWMISSEDCALLS_TAG,
missed);
@@ -194,7 +194,7 @@ static void phonebook_size_result(const char *buffer, size_t bufsize,
}
static void query_result(const char *buffer, size_t bufsize, int vcards,
- int missed, gboolean lastpart, void *user_data)
+ uint8_t missed, gboolean lastpart, void *user_data)
{
struct pbap_session *pbap = user_data;
@@ -224,7 +224,7 @@ static void query_result(const char *buffer, size_t bufsize, int vcards,
pbap->obj->firstpacket = TRUE;
}
- pbap->obj->apparam = g_obex_apparam_set_uint16(pbap->obj->apparam,
+ pbap->obj->apparam = g_obex_apparam_set_uint8(pbap->obj->apparam,
NEWMISSEDCALLS_TAG,
missed);
diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c
index 36e73db77..ba0940c40 100644
--- a/obexd/plugins/phonebook-tracker.c
+++ b/obexd/plugins/phonebook-tracker.c
@@ -488,7 +488,7 @@ struct phonebook_data {
GSList *contacts;
phonebook_cache_ready_cb ready_cb;
phonebook_entry_cb entry_cb;
- int newmissedcalls;
+ uint8_t newmissedcalls;
GCancellable *query_canc;
char *req_name;
int vcard_part_count;
diff --git a/obexd/plugins/phonebook.h b/obexd/plugins/phonebook.h
index b878b143d..7e99de6e7 100644
--- a/obexd/plugins/phonebook.h
+++ b/obexd/plugins/phonebook.h
@@ -61,7 +61,7 @@ struct apparam_field {
* Contacts will be returned in the vcard format.
*/
typedef void (*phonebook_cb) (const char *buffer, size_t bufsize,
- int vcards, int missed, gboolean lastpart, void *user_data);
+ int vcards, uint8_t missed, gboolean lastpart, void *user_data);
/*
* Interface between the PBAP core and backends to
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] obexd/pbap: Report NewMissedCalls for mch
2026-10-27 7:10 [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting Jinwang Li
2026-10-27 7:10 ` [PATCH v2 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
@ 2026-10-27 7:10 ` Jinwang Li
2026-10-28 13:30 ` [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting patchwork-bot+bluetooth
2 siblings, 0 replies; 5+ messages in thread
From: Jinwang Li @ 2026-10-27 7:10 UTC (permalink / raw)
To: linux-bluetooth
Cc: cheng.jiang, quic_chezhou, wei.deng, shuai.zhang, mengshi.wu,
jinwang.li, xiuzhuo.shang
The dummy backend always reports zero NewMissedCalls. Count the
vCards in the folder instead, capped at UINT8_MAX.
Fixes PTS test PBAP/PSE/PBD/BV-05-C
Signed-off-by: Jinwang Li <jinwang.li@oss.qualcomm.com>
---
obexd/plugins/phonebook-dummy.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/obexd/plugins/phonebook-dummy.c b/obexd/plugins/phonebook-dummy.c
index 782b8948d..0a0ae24ff 100644
--- a/obexd/plugins/phonebook-dummy.c
+++ b/obexd/plugins/phonebook-dummy.c
@@ -41,6 +41,7 @@ struct dummy_data {
char *folder;
int fd;
guint id;
+ uint8_t newmissedcalls;
};
struct cache_query {
@@ -244,7 +245,8 @@ static gboolean read_dir(void *user_data)
closedir(dp);
done:
/* FIXME: Missing vCards fields filtering */
- dummy->cb(buffer->str, buffer->len, count, 0, TRUE, dummy->user_data);
+ dummy->cb(buffer->str, buffer->len, count, dummy->newmissedcalls,
+ TRUE, dummy->user_data);
g_string_free(buffer, TRUE);
@@ -360,6 +362,22 @@ static gboolean is_dir(const char *dir)
return S_ISDIR(st.st_mode);
}
+static uint8_t count_vcards(const char *folder)
+{
+ DIR *dp;
+ uint16_t count = 0;
+
+ dp = opendir(folder);
+ if (dp == NULL)
+ return 0;
+
+ foreach_vcard(dp, NULL, 0, UINT8_MAX, NULL, &count);
+
+ closedir(dp);
+
+ return count;
+}
+
char *phonebook_set_folder(const char *current_folder,
const char *new_folder, uint8_t flags, int *err)
{
@@ -490,6 +508,9 @@ void *phonebook_pull(const char *name, const struct apparam_field *params,
dummy->folder = folder;
dummy->fd = -1;
+ if (g_strcmp0(name, PB_CALLS_MISSED) == 0)
+ dummy->newmissedcalls = count_vcards(folder);
+
if (err)
*err = 0;
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: obexd/pbap: Fix NewMissedCalls reporting
2026-10-27 7:10 ` [PATCH v2 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
@ 2026-10-27 9:01 ` bluez.test.bot
0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-10-27 9:01 UTC (permalink / raw)
To: linux-bluetooth, jinwang.li
[-- Attachment #1: Type: text/plain, Size: 858 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/series/1194324/
---Test result---
Test Summary:
CheckPatch PASS 1.38 seconds
GitLint PASS 1.23 seconds
BuildEll PASS 20.09 seconds
BluezMake PASS 305.86 seconds
CheckSmatch PASS 298.69 seconds
bluezmakeextell PASS 95.71 seconds
TestFunctional PASS 1129.11 seconds
IncrementalBuild PASS 299.93 seconds
ScanBuild PASS 1142.38 seconds
https://github.com/bluez/bluez/pull/2719
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting
2026-10-27 7:10 [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting Jinwang Li
2026-10-27 7:10 ` [PATCH v2 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
2026-10-27 7:10 ` [PATCH v2 2/2] obexd/pbap: Report NewMissedCalls for mch Jinwang Li
@ 2026-10-28 13:30 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2026-10-28 13:30 UTC (permalink / raw)
To: Jinwang Li
Cc: linux-bluetooth, cheng.jiang, quic_chezhou, wei.deng, shuai.zhang,
mengshi.wu, xiuzhuo.shang
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 27 Oct 2026 15:10:44 +0800 you wrote:
> This series fixes NewMissedCalls reporting in obexd PBAP.
>
> The first patch fixes the apparam encoding: NewMissedCalls is a
> one-byte value but was encoded as uint16. The second patch makes the
> dummy backend report the actual missed-call count for the mch folder
> instead of always zero, which is required by PTS PBAP/PSE/PBD/BV-05-C.
>
> [...]
Here is the summary with links:
- [v2,1/2] obexd/pbap: Fix NewMissedCalls parameter size
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f1af76b9868e
- [v2,2/2] obexd/pbap: Report NewMissedCalls for mch
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d987dbc0f081
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] 5+ messages in thread
end of thread, other threads:[~2026-10-28 13:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27 7:10 [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting Jinwang Li
2026-10-27 7:10 ` [PATCH v2 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
2026-10-27 9:01 ` obexd/pbap: Fix NewMissedCalls reporting bluez.test.bot
2026-10-27 7:10 ` [PATCH v2 2/2] obexd/pbap: Report NewMissedCalls for mch Jinwang Li
2026-10-28 13:30 ` [PATCH v2 0/2] obexd/pbap: Fix NewMissedCalls reporting 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