cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [31/50] [abbrv] git commit: updated refs/heads/rbd-snap-clone to bc82173
Date Sat, 18 May 2013 12:56:56 GMT
fix null pointer dereference in cloud-server


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3ed9e42d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3ed9e42d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3ed9e42d

Branch: refs/heads/rbd-snap-clone
Commit: 3ed9e42dd2b000299aeab51681d96eb7c9d74249
Parents: 35de50d
Author: Mice Xia <mice_xia@tcloudcomputing.com>
Authored: Thu May 16 16:50:29 2013 +0800
Committer: Mice Xia <mice_xia@tcloudcomputing.com>
Committed: Fri May 17 09:44:01 2013 +0800

----------------------------------------------------------------------
 .../cloud/network/StorageNetworkManagerImpl.java   |    5 +++--
 .../gslb/GlobalLoadBalancingRulesServiceImpl.java  |    4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ed9e42d/server/src/com/cloud/network/StorageNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/StorageNetworkManagerImpl.java b/server/src/com/cloud/network/StorageNetworkManagerImpl.java
index 9a17382..901e204 100755
--- a/server/src/com/cloud/network/StorageNetworkManagerImpl.java
+++ b/server/src/com/cloud/network/StorageNetworkManagerImpl.java
@@ -315,9 +315,10 @@ public class StorageNetworkManagerImpl extends ManagerBase implements
StorageNet
         List<StorageNetworkIpRangeVO> ranges = _sNwIpRangeDao.listByPodId(podId);
         for (StorageNetworkIpRangeVO r : ranges) {
             try {
-                r = _sNwIpRangeDao.acquireInLockTable(r.getId());
+                Long rangeId = r.getId();
+                r = _sNwIpRangeDao.acquireInLockTable(rangeId);
                 if (r == null) {
-                    String msg = "Unable to acquire lock on storage network ip range id="
+ r.getId() + ", delete failed";
+                    String msg = "Unable to acquire lock on storage network ip range id="
+ rangeId + ", delete failed";
                     s_logger.warn(msg);
                     throw new CloudRuntimeException(msg);
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ed9e42d/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
index 0622f77..a1865c6 100644
--- a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
+++ b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
@@ -155,7 +155,7 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
         long gslbRuleId =  assignToGslbCmd.getGlobalLoadBalancerRuleId();
         GlobalLoadBalancerRuleVO gslbRule = _gslbRuleDao.findById(gslbRuleId);
         if (gslbRule == null) {
-            throw new InvalidParameterValueException("Invalid global load balancer rule id:
" + gslbRule.getUuid());
+            throw new InvalidParameterValueException("Invalid global load balancer rule id:
" + gslbRuleId);
         }
 
         _accountMgr.checkAccess(caller, SecurityChecker.AccessType.ModifyEntry, true, gslbRule);
@@ -282,7 +282,7 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
         long gslbRuleId =  removeFromGslbCmd.getGlobalLoadBalancerRuleId();
         GlobalLoadBalancerRuleVO gslbRule = _gslbRuleDao.findById(gslbRuleId);
         if (gslbRule == null) {
-            throw new InvalidParameterValueException("Invalid global load balancer rule id:
" + gslbRule.getUuid());
+            throw new InvalidParameterValueException("Invalid global load balancer rule id:
" + gslbRuleId);
         }
 
         _accountMgr.checkAccess(caller, SecurityChecker.AccessType.ModifyEntry, true, gslbRule);


Mime
View raw message