esx: Fix check in esxDomainGetInfo's perf metric handling

This commit is contained in:
Matthias Bolte 2010-10-15 20:13:04 +02:00
parent 534056c73d
commit 6c4b04142b

View File

@ -2329,15 +2329,17 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
perfEntityMetric = perfEntityMetric =
esxVI_PerfEntityMetric_DynamicCast(perfEntityMetricBase); esxVI_PerfEntityMetric_DynamicCast(perfEntityMetricBase);
if (perfMetricIntSeries == NULL) { if (perfEntityMetric == NULL) {
VIR_ERROR0(_("QueryPerf returned object with unexpected type")); VIR_ERROR(_("QueryPerf returned object with unexpected type '%s'"),
esxVI_Type_ToString(perfEntityMetricBase->_type));
} }
perfMetricIntSeries = perfMetricIntSeries =
esxVI_PerfMetricIntSeries_DynamicCast(perfEntityMetric->value); esxVI_PerfMetricIntSeries_DynamicCast(perfEntityMetric->value);
if (perfMetricIntSeries == NULL) { 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; for (; perfMetricIntSeries != NULL;