* [PATCH v1] obexd: fix PBAP PullPhoneBook failure with ebook backend
@ 2026-05-22 6:03 Zhiyuan Sheng
2026-05-22 8:51 ` [v1] " bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Zhiyuan Sheng @ 2026-05-22 6:03 UTC (permalink / raw)
To: linux-bluetooth; +Cc: cheng.jiang, shuai.zhang
phonebook_pull() in phonebook-ebook.c does not set *err = 0 on the
success path, unlike phonebook-tracker.c and phonebook-dummy.c. The
caller vobject_pull_open() in pbap.c declares 'ret' without
initialization and passes &ret to phonebook_pull(), so 'ret' retains
an indeterminate stack value when the ebook backend is in use. The
subsequent 'if (ret < 0)' check then incorrectly triggers and rejects
the request with Internal Server Error.
Fix this by setting *err = 0 on success in phonebook-ebook.c, and
initialize 'ret' to 0 in vobject_pull_open() as a defensive measure
to guard against any backend that omits this assignment.
Signed-off-by: Zhiyuan Sheng <zhiyuan.sheng@oss.qualcomm.com>
---
obexd/plugins/pbap.c | 2 +-
obexd/plugins/phonebook-ebook.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 74976890d..9f8684863 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -661,7 +661,7 @@ static void *vobject_pull_open(const char *name, int oflag, mode_t mode,
{
struct pbap_session *pbap = context;
phonebook_cb cb;
- int ret;
+ int ret = 0;
void *request;
DBG("name %s context %p maxlistcount %d", name, context,
diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c
index d772edca0..5fc0498c1 100644
--- a/obexd/plugins/phonebook-ebook.c
+++ b/obexd/plugins/phonebook-ebook.c
@@ -262,6 +262,9 @@ void *phonebook_pull(const char *name, const struct apparam_field *params,
data->query = e_book_query_to_string(query);
e_book_query_unref(query);
+ if (err)
+ *err = 0;
+
return data;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [v1] obexd: fix PBAP PullPhoneBook failure with ebook backend
2026-05-22 6:03 [PATCH v1] obexd: fix PBAP PullPhoneBook failure with ebook backend Zhiyuan Sheng
@ 2026-05-22 8:51 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-05-22 8:51 UTC (permalink / raw)
To: linux-bluetooth, zhiyuan.sheng
[-- Attachment #1: Type: text/plain, Size: 826 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=1099150
---Test result---
Test Summary:
CheckPatch PASS 0.49 seconds
GitLint PASS 0.34 seconds
BuildEll PASS 20.38 seconds
BluezMake PASS 679.47 seconds
CheckSmatch PASS 362.36 seconds
bluezmakeextell PASS 187.61 seconds
IncrementalBuild PASS 668.91 seconds
ScanBuild PASS 1076.15 seconds
https://github.com/bluez/bluez/pull/2145
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-22 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 6:03 [PATCH v1] obexd: fix PBAP PullPhoneBook failure with ebook backend Zhiyuan Sheng
2026-05-22 8:51 ` [v1] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox