* [PATCH BlueZ] audio/hfp-hf: Fix org.bluez.Telephony1.Dial reply message
@ 2026-11-15 10:19 Frédéric Danis
2026-11-15 20:43 ` [BlueZ] " bluez.test.bot
2026-11-16 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Frédéric Danis @ 2026-11-15 10:19 UTC (permalink / raw)
To: linux-bluetooth
From: Frédéric Danis <frederic.danis.oss@gmail.com>
An org.bluez.Call1 object is expected to be returned on
org.bluez.Telephony1.Dial() success.
---
profiles/audio/hfp-hf.c | 51 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 48 insertions(+), 3 deletions(-)
diff --git a/profiles/audio/hfp-hf.c b/profiles/audio/hfp-hf.c
index 4e626653d..bc6d7229f 100644
--- a/profiles/audio/hfp-hf.c
+++ b/profiles/audio/hfp-hf.c
@@ -90,6 +90,7 @@ struct hfp_device {
uint8_t codec;
unsigned int resume_id;
struct connect_data *pending_connect;
+ DBusMessage *dial_msg;
hfp_hf_sco_closed_cb sco_closed_cb;
void *sco_closed_data;
};
@@ -192,6 +193,29 @@ static void sco_connect_complete(struct connect_data *connect_data, int status)
g_free(connect_data);
}
+static void dial_complete(enum hfp_result res, enum hfp_error cme_err,
+ void *user_data)
+{
+ struct hfp_device *dev = user_data;
+
+ if (dev->dial_msg == NULL)
+ return;
+
+ if (res != HFP_RESULT_OK) {
+ DBusMessage *reply;
+ const char *name = dbus_message_get_member(dev->dial_msg);
+
+ error("Command %s error: %d", name, res);
+ reply = g_dbus_create_error(dev->dial_msg, ERROR_INTERFACE
+ ".Failed",
+ "Command %s failed: %d", name, res);
+ g_dbus_send_message(btd_get_dbus_connection(), reply);
+ dbus_message_unref(dev->dial_msg);
+ dev->dial_msg = NULL;
+ return;
+ }
+}
+
static void device_destroy(struct hfp_device *dev)
{
struct hfp_server *server;
@@ -200,6 +224,10 @@ static void device_destroy(struct hfp_device *dev)
telephony_set_state(dev->telephony, DISCONNECTING);
+ if (dev->dial_msg)
+ dial_complete(HFP_RESULT_ERROR,
+ HFP_ERROR_NO_CONNECTION_TO_PHONE, dev);
+
if (dev->pending_connect)
sco_connect_complete(dev->pending_connect, -ENOTCONN);
@@ -288,10 +316,23 @@ static void hfp_hf_call_added(uint id, enum hfp_call_status status,
call->multiparty = mpty;
if (telephony_call_register_interface(call)) {
telephony_free_call(call);
+ if (status == CALL_STATUS_DIALING ||
+ status == CALL_STATUS_ALERTING)
+ dial_complete(HFP_RESULT_ERROR, HFP_ERROR_MEMORY_FULL,
+ dev);
return;
}
queue_push_tail(dev->calls, call);
+
+ if ((status == CALL_STATUS_DIALING || status == CALL_STATUS_ALERTING)
+ && dev->dial_msg) {
+ g_dbus_send_reply(btd_get_dbus_connection(), dev->dial_msg,
+ DBUS_TYPE_OBJECT_PATH, &call->path,
+ DBUS_TYPE_INVALID);
+ dbus_message_unref(dev->dial_msg);
+ dev->dial_msg = NULL;
+ }
}
static void hfp_hf_call_removed(uint id, void *user_data)
@@ -566,10 +607,14 @@ static DBusMessage *dial(DBusConnection *conn, DBusMessage *msg,
if (strncmp(number, URI_PREFIX, strlen(URI_PREFIX)) != 0)
return btd_error_invalid_args(msg);
- ret = hfp_hf_dial(dev->hf, number + strlen(URI_PREFIX), cmd_complete,
- dbus_message_ref(msg));
- if (!ret)
+ dev->dial_msg = dbus_message_ref(msg);
+ ret = hfp_hf_dial(dev->hf, number + strlen(URI_PREFIX), dial_complete,
+ dev);
+ if (!ret) {
+ dbus_message_unref(dev->dial_msg);
+ dev->dial_msg = NULL;
return btd_error_failed(msg, "Dial command failed");
+ }
return NULL;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] audio/hfp-hf: Fix org.bluez.Telephony1.Dial reply message
2026-11-15 10:19 [PATCH BlueZ] audio/hfp-hf: Fix org.bluez.Telephony1.Dial reply message Frédéric Danis
@ 2026-11-15 20:43 ` bluez.test.bot
2026-11-16 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-11-15 20:43 UTC (permalink / raw)
To: linux-bluetooth, frederic.danis
[-- Attachment #1: Type: text/plain, Size: 1260 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/1211774/
---Test result---
Test Summary:
CheckPatch PASS 0.51 seconds
GitLint PASS 0.33 seconds
BuildEll PASS 16.18 seconds
BluezMake PASS 233.84 seconds
MakeCheck PASS 3.25 seconds
MakeDistcheck PASS 121.14 seconds
CheckValgrind PASS 129.54 seconds
CheckSmatch PASS 234.35 seconds
bluezmakeextell PASS 75.96 seconds
TestFunctional FAIL 1015.95 seconds
IncrementalBuild PASS 235.24 seconds
ScanBuild PASS 874.81 seconds
Details
##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_bap::test_bass_past_earbuds_transport_acquire[hosts11-vm3]: AssertionError: Failed to acquire: org.bluez.Error.Failed
https://github.com/bluez/bluez/pull/2829
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] audio/hfp-hf: Fix org.bluez.Telephony1.Dial reply message
2026-11-15 10:19 [PATCH BlueZ] audio/hfp-hf: Fix org.bluez.Telephony1.Dial reply message Frédéric Danis
2026-11-15 20:43 ` [BlueZ] " bluez.test.bot
@ 2026-11-16 20:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-11-16 20:00 UTC (permalink / raw)
To: =?utf-8?b?RnLDqWTDqXJpYyBEYW5pcyA8ZnJlZGVyaWMuZGFuaXNAY29sbGFib3JhLmNvbT4=?=
Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Sun, 15 Nov 2026 11:19:07 +0100 you wrote:
> From: Frédéric Danis <frederic.danis.oss@gmail.com>
>
> An org.bluez.Call1 object is expected to be returned on
> org.bluez.Telephony1.Dial() success.
> ---
> profiles/audio/hfp-hf.c | 51 ++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 48 insertions(+), 3 deletions(-)
Here is the summary with links:
- [BlueZ] audio/hfp-hf: Fix org.bluez.Telephony1.Dial reply message
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=b5deaf496419
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] 3+ messages in thread
end of thread, other threads:[~2026-11-16 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15 10:19 [PATCH BlueZ] audio/hfp-hf: Fix org.bluez.Telephony1.Dial reply message Frédéric Danis
2026-11-15 20:43 ` [BlueZ] " bluez.test.bot
2026-11-16 20:00 ` [PATCH BlueZ] " 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