[liboobs] Print error from D-Bus in case of failure in oobs_session_get_platform()



commit a7ac19bcfdd8624e07f1cc0e5cc0b8d05367ab0b
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Mon Aug 31 23:53:40 2009 +0200

    Print error from D-Bus in case of failure in oobs_session_get_platform()
    
    This method call is particularly critical since it's where all visible failures loading the GUI happen. Printing a warning allows debugging the "Unexpected error" we report in a dialog. Also fix a printf warning in the other D-Bus error report.

 oobs/oobs-session.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/oobs/oobs-session.c b/oobs/oobs-session.c
index 8b3246e..d20f121 100644
--- a/oobs/oobs-session.c
+++ b/oobs/oobs-session.c
@@ -104,7 +104,7 @@ oobs_session_init (OobsSession *session)
   priv->connection = dbus_bus_get (DBUS_BUS_SYSTEM, &priv->dbus_error);
 
   if (dbus_error_is_set (&priv->dbus_error))
-    g_warning (priv->dbus_error.message);
+    g_warning ("%s", priv->dbus_error.message);
   else
     dbus_connection_setup_with_g_main (priv->connection, NULL);
 
@@ -311,7 +311,10 @@ oobs_session_get_platform (OobsSession  *session,
         /* Warning: this can mean that D-Bus policy denied access, but also that PolicyKit refused it */
 	result = OOBS_RESULT_ACCESS_DENIED;
       else
+      {
 	result = OOBS_RESULT_ERROR;
+        g_warning ("There was an unknown error communicating with the backends: %s", priv->dbus_error.message);
+      }
 
       dbus_error_free (&priv->dbus_error);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]