[libgovirt] More verbose console warning when rest_proxy_call_sync() fails



commit 91f838686e9e20a6f3652d9197032007cf45d35c
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Mon Oct 7 11:47:10 2013 +0200

    More verbose console warning when rest_proxy_call_sync() fails

 govirt/ovirt-proxy.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/govirt/ovirt-proxy.c b/govirt/ovirt-proxy.c
index ab70a87..c2313bf 100644
--- a/govirt/ovirt-proxy.c
+++ b/govirt/ovirt-proxy.c
@@ -152,7 +152,11 @@ RestXmlNode *ovirt_proxy_get_collection_xml(OvirtProxy *proxy,
     rest_proxy_call_add_header(call, "All-Content", "true");
 
     if (!rest_proxy_call_sync(call, error)) {
-        g_warning("Error while getting collection");
+        if ((error != NULL) && (*error != NULL)) {
+            g_warning("Error while getting collection: %s", (*error)->message);
+        } else {
+            g_warning("Error while getting collection");
+        }
         g_object_unref(G_OBJECT(call));
         return NULL;
     }


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