From: Burt Silverman <burtms@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Burt Silverman <burtms@gmail.com>
Subject: [PATCH] Print an error message if g_dbus_setup_bus fails.
Date: Fri, 26 Aug 2011 18:39:01 -0400 [thread overview]
Message-ID: <1314398341-2733-1-git-send-email-burtms@gmail.com> (raw)
That is standard processing when dbus_error_is_set() returns true, according to
dbus/dbus/dbus-errors.c.
In this case of g_dbus_setup_bus(), it provides extra help for determing the
specific cause of the error.
---
src/main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/main.c b/src/main.c
index 7fecc5a..6dc60a4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -311,6 +311,7 @@ static int connect_dbus(void)
conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, BLUEZ_NAME, &err);
if (!conn) {
if (dbus_error_is_set(&err)) {
+ g_printerr("an error occurred: %s\n", err.message);
dbus_error_free(&err);
return -EIO;
}
--
1.7.6
next reply other threads:[~2011-08-26 22:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 22:39 Burt Silverman [this message]
2011-08-30 10:13 ` [PATCH] Print an error message if g_dbus_setup_bus fails Johan Hedberg
2011-09-08 15:09 ` Burt Silverman
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=1314398341-2733-1-git-send-email-burtms@gmail.com \
--to=burtms@gmail.com \
--cc=linux-bluetooth@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.