You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2014/05/09 12:48:58 UTC
[2/3] git commit: updated refs/heads/4.4-forward to 98df3e5
CLOUDSTACK-6620: Fixed null pointer exception in hyperv agent in getting vmstats, when all vms are deleted from outside
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4106aa07
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4106aa07
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4106aa07
Branch: refs/heads/4.4-forward
Commit: 4106aa07214209631ab9e6223c7efe4580ac30bf
Parents: 704f6d8
Author: Anshul Gangwar <an...@citrix.com>
Authored: Fri May 9 14:49:32 2014 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Fri May 9 15:32:49 2014 +0530
----------------------------------------------------------------------
.../hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4106aa07/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
index 7dbb8c1..372f848 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
@@ -2685,6 +2685,10 @@ namespace HypervResource
public void GetSummaryInfo(Dictionary<string, VmStatsEntry> vmProcessorInfo, List<System.Management.ManagementPath> vmsToInspect)
{
+ if (vmsToInspect == null || vmsToInspect.Count == 0)
+ {
+ return;
+ }
// Process info available from WMI,
// See http://msdn.microsoft.com/en-us/library/hh850062(v=vs.85).aspx
uint[] requestedInfo = new uint[] { // TODO: correct?