From: Matthias Bolte Date: Fri, 15 Oct 2010 18:13:04 +0000 (+0200) Subject: esx: Fix check in esxDomainGetInfo's perf metric handling X-Git-Tag: v0.8.5~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c4b04142b014746e341e9834adbae6e60962af9;p=thirdparty%2Flibvirt.git esx: Fix check in esxDomainGetInfo's perf metric handling --- diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 8bc3be29fa..1b4ee299f8 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -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;