* [PATCH v1 0/2] obexd/pbap: Report NewMissedCalls for mch
@ 2026-10-26 13:15 Jinwang Li
2026-10-26 13:15 ` [PATCH v1 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-26 13:15 UTC (permalink / raw)
To: linux-bluetooth
Cc: cheng.jiang, quic_chezhou, wei.deng, shuai.zhang, mengshi.wu,
jinwang.li, xiuzhuo.shang
The dummy phonebook backend always reports NewMissedCalls as zero.
Patch 1 fixes the NewMissedCalls apparam encoding, which used the
wrong width. Patch 2 makes the dummy backend count the mch vCards
and report the real value.
Fixes PTS test PBAP/PSE/PBD/BV-05-C
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 v1 1/2] obexd/pbap: Fix NewMissedCalls parameter size
2026-10-26 13:15 [PATCH v1 0/2] obexd/pbap: Report NewMissedCalls for mch Jinwang Li
@ 2026-10-26 13:15 ` Jinwang Li
2026-10-26 14:54 ` obexd/pbap: Report NewMissedCalls for mch bluez.test.bot
2026-10-26 13:15 ` [PATCH v1 2/2] " Jinwang Li
2026-10-28 13:30 ` [PATCH v1 0/2] " patchwork-bot+bluetooth
2 siblings, 1 reply; 5+ messages in thread
From: Jinwang Li @ 2026-10-26 13:15 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..e343fa1fa 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..29b308cb7 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 v1 2/2] obexd/pbap: Report NewMissedCalls for mch
2026-10-26 13:15 [PATCH v1 0/2] obexd/pbap: Report NewMissedCalls for mch Jinwang Li
2026-10-26 13:15 ` [PATCH v1 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
@ 2026-10-26 13:15 ` Jinwang Li
2026-10-28 13:30 ` [PATCH v1 0/2] " patchwork-bot+bluetooth
2 siblings, 0 replies; 5+ messages in thread
From: Jinwang Li @ 2026-10-26 13:15 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: Report NewMissedCalls for mch
2026-10-26 13:15 ` [PATCH v1 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
@ 2026-10-26 14:54 ` bluez.test.bot
0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-10-26 14:54 UTC (permalink / raw)
To: linux-bluetooth, jinwang.li
[-- Attachment #1: Type: text/plain, Size: 1947 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/1193772/
---Test result---
Test Summary:
CheckPatch FAIL 0.84 seconds
GitLint PASS 0.54 seconds
BuildEll PASS 17.25 seconds
BluezMake PASS 253.49 seconds
CheckSmatch PASS 230.96 seconds
bluezmakeextell PASS 84.24 seconds
TestFunctional PASS 998.84 seconds
IncrementalBuild PASS 255.19 seconds
ScanBuild PASS 880.29 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v1,1/2] obexd/pbap: Fix NewMissedCalls parameter size
WARNING:LONG_LINE: line length of 83 exceeds 80 columns
#166: FILE: obexd/plugins/irmc.c:93:
+ uint8_t missed, gboolean lastpart, void *user_data)
WARNING:LONG_LINE: line length of 83 exceeds 80 columns
#197: FILE: obexd/plugins/pbap.c:197:
+ uint8_t missed, gboolean lastpart, void *user_data)
/home/runner/work/bluez/bluez/src/patch/14915493.patch total: 0 errors, 2 warnings, 64 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluez/bluez/src/patch/14915493.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
https://github.com/bluez/bluez/pull/2713
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 0/2] obexd/pbap: Report NewMissedCalls for mch
2026-10-26 13:15 [PATCH v1 0/2] obexd/pbap: Report NewMissedCalls for mch Jinwang Li
2026-10-26 13:15 ` [PATCH v1 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
2026-10-26 13:15 ` [PATCH v1 2/2] " 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 Mon, 26 Oct 2026 21:15:02 +0800 you wrote:
> The dummy phonebook backend always reports NewMissedCalls as zero.
> Patch 1 fixes the NewMissedCalls apparam encoding, which used the
> wrong width. Patch 2 makes the dummy backend count the mch vCards
> and report the real value.
>
> Fixes PTS test PBAP/PSE/PBD/BV-05-C
>
> [...]
Here is the summary with links:
- [v1,1/2] obexd/pbap: Fix NewMissedCalls parameter size
(no matching commit)
- [v1,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-26 13:15 [PATCH v1 0/2] obexd/pbap: Report NewMissedCalls for mch Jinwang Li
2026-10-26 13:15 ` [PATCH v1 1/2] obexd/pbap: Fix NewMissedCalls parameter size Jinwang Li
2026-10-26 14:54 ` obexd/pbap: Report NewMissedCalls for mch bluez.test.bot
2026-10-26 13:15 ` [PATCH v1 2/2] " Jinwang Li
2026-10-28 13:30 ` [PATCH v1 0/2] " 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