[gnome-desktop] pnp-ids: Add more debug



commit cb25238ebd0a69359d46def8eecf0bd098644a87
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Dec 19 13:49:54 2012 +0100

    pnp-ids: Add more debug

 libgnome-desktop/gnome-pnp-ids.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libgnome-desktop/gnome-pnp-ids.c b/libgnome-desktop/gnome-pnp-ids.c
index 514e6fa..2c548b0 100644
--- a/libgnome-desktop/gnome-pnp-ids.c
+++ b/libgnome-desktop/gnome-pnp-ids.c
@@ -226,6 +226,8 @@ gnome_pnp_ids_load (GnomePnpIds *pnp_ids, GError **error)
                 }
         }
 
+        g_debug ("Added %i items to the vendor hashtable", i);
+
         return TRUE;
 }
 
@@ -257,6 +259,7 @@ gnome_pnp_ids_get_pnp_id (GnomePnpIds *pnp_ids, const gchar *pnp_id)
 {
         GnomePnpIdsPrivate *priv = pnp_ids->priv;
         const char *found;
+        GError *error = NULL;
         guint size;
 
         g_return_val_if_fail (GNOME_IS_PNP_IDS (pnp_ids), NULL);
@@ -265,8 +268,11 @@ gnome_pnp_ids_get_pnp_id (GnomePnpIds *pnp_ids, const gchar *pnp_id)
         /* if table is empty, try to load it */
         size = g_hash_table_size (priv->pnp_table);
         if (size == 0) {
-                if (gnome_pnp_ids_load (pnp_ids, NULL) == FALSE)
+                if (gnome_pnp_ids_load (pnp_ids, &error) == FALSE) {
+                        g_warning ("Failed to load PNP ids: %s", error->message);
+                        g_error_free (error);
                         return NULL;
+                }
         }
 
         /* look this up in the table */



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