* [PATCH] Print an error message if g_dbus_setup_bus fails.
@ 2011-08-26 22:39 Burt Silverman
2011-08-30 10:13 ` Johan Hedberg
0 siblings, 1 reply; 3+ messages in thread
From: Burt Silverman @ 2011-08-26 22:39 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Burt Silverman
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Print an error message if g_dbus_setup_bus fails.
2011-08-26 22:39 [PATCH] Print an error message if g_dbus_setup_bus fails Burt Silverman
@ 2011-08-30 10:13 ` Johan Hedberg
2011-09-08 15:09 ` Burt Silverman
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2011-08-30 10:13 UTC (permalink / raw)
To: Burt Silverman; +Cc: linux-bluetooth
Hi Burt,
On Fri, Aug 26, 2011, Burt Silverman wrote:
> 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(-)
Applied (after I made the message prefix a bit more descriptive).
Thanks.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Print an error message if g_dbus_setup_bus fails.
2011-08-30 10:13 ` Johan Hedberg
@ 2011-09-08 15:09 ` Burt Silverman
0 siblings, 0 replies; 3+ messages in thread
From: Burt Silverman @ 2011-09-08 15:09 UTC (permalink / raw)
To: linux-bluetooth
Thanks, Johan. I use Fedora Linux, and their "preupgrade" mechanism
often gets me into trouble, in various places, including bluetooth!
--Burt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-08 15:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-26 22:39 [PATCH] Print an error message if g_dbus_setup_bus fails Burt Silverman
2011-08-30 10:13 ` Johan Hedberg
2011-09-08 15:09 ` Burt Silverman
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).