]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
esx: Fix check in esxDomainGetInfo's perf metric handling
authorMatthias Bolte <matthias.bolte@googlemail.com>
Fri, 15 Oct 2010 18:13:04 +0000 (20:13 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 16 Oct 2010 09:39:36 +0000 (11:39 +0200)
src/esx/esx_driver.c

index 8bc3be29fa4a6fc4a409ed08e10f8a80128b1d52..1b4ee299f826ded7d28b5a752a70205d406ca11c 100644 (file)
@@ -2329,15 +2329,17 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
                 perfEntityMetric =
                   esxVI_PerfEntityMetric_DynamicCast(perfEntityMetricBase);
 
-                if (perfMetricIntSeries == NULL) {
-                    VIR_ERROR0(_("QueryPerf returned object with unexpected type"));
+                if (perfEntityMetric == NULL) {
+                    VIR_ERROR(_("QueryPerf returned object with unexpected type '%s'"),
+                              esxVI_Type_ToString(perfEntityMetricBase->_type));
                 }
 
                 perfMetricIntSeries =
                   esxVI_PerfMetricIntSeries_DynamicCast(perfEntityMetric->value);
 
                 if (perfMetricIntSeries == NULL) {
-                    VIR_ERROR0(_("QueryPerf returned object with unexpected type"));
+                    VIR_ERROR(_("QueryPerf returned object with unexpected type '%s'"),
+                              esxVI_Type_ToString(perfEntityMetric->value->_type));
                 }
 
                 for (; perfMetricIntSeries != NULL;