From: Miao-chen Chou <mcchou@chromium.org>
To: Bluetooth Kernel Mailing List <linux-bluetooth@vger.kernel.org>
Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
Alain Michaud <alainm@chromium.org>,
Marcel Holtmann <marcel@holtmann.org>,
Howard Chung <howardchung@google.com>,
Miao-chen Chou <mcchou@chromium.org>
Subject: [BlueZ PATCH v2 3/3] client: Print error code for connect methods
Date: Fri, 25 Jun 2021 22:21:55 -0700 [thread overview]
Message-ID: <20210625222111.BlueZ.v2.3.I226fdcdd12b13e4875c8cd03b42fc52283920cc4@changeid> (raw)
In-Reply-To: <20210626052152.2543526-1-mcchou@chromium.org>
The following steps were performed.
- Issuing repeated commands to connect the same BLE device.
- Verifying the print in bluetoothctl console
Reviewed-by: Alain Michaud <alainm@chromium.org>
Reviewed-by: Howard Chung <howardchung@google.com>
---
Changes in v2:
- Add documentation for error codes
client/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/client/main.c b/client/main.c
index da877b546..488a24bf6 100644
--- a/client/main.c
+++ b/client/main.c
@@ -1949,7 +1949,8 @@ static void connect_reply(DBusMessage *message, void *user_data)
dbus_error_init(&error);
if (dbus_set_error_from_message(&error, message) == TRUE) {
- bt_shell_printf("Failed to connect: %s\n", error.name);
+ bt_shell_printf("Failed to connect: %s %s\n", error.name,
+ error.message);
dbus_error_free(&error);
return bt_shell_noninteractive_quit(EXIT_FAILURE);
}
--
2.32.0.93.g670b81a890-goog
prev parent reply other threads:[~2021-06-26 5:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-26 5:21 [BlueZ PATCH v2 0/3] Detailed error code Miao-chen Chou
2021-06-26 5:21 ` [BlueZ PATCH v2 1/3] error: BR/EDR and LE connection failure reasons Miao-chen Chou
2021-06-26 5:39 ` Marcel Holtmann
2021-07-14 21:08 ` Miao-chen Chou
2021-07-14 22:06 ` Luiz Augusto von Dentz
2021-07-15 23:21 ` Miao-chen Chou
2021-07-16 17:51 ` Luiz Augusto von Dentz
2021-07-19 7:57 ` Marcel Holtmann
2021-07-20 20:57 ` Miao-chen Chou
2021-07-22 20:54 ` Alain Michaud
2021-07-23 7:38 ` Marcel Holtmann
2021-07-23 8:20 ` Szymon Janc
2021-07-23 13:20 ` Alain Michaud
2021-07-24 1:24 ` Miao-chen Chou
2021-06-26 5:52 ` Detailed error code bluez.test.bot
2021-06-26 5:21 ` [BlueZ PATCH v2 2/3] device: Include BtdError code in Connect() return Miao-chen Chou
2021-06-26 5:21 ` Miao-chen Chou [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210625222111.BlueZ.v2.3.I226fdcdd12b13e4875c8cd03b42fc52283920cc4@changeid \
--to=mcchou@chromium.org \
--cc=alainm@chromium.org \
--cc=howardchung@google.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).