Updated Branches: refs/heads/4.1 24b48f311 -> a6427266b
CLOUDSTACK-1207. UpdateNetwork API fails with NPE if the network offering is not being updated and is non-persistent. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/a6427266 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/a6427266 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/a6427266 Branch: refs/heads/4.1 Commit: a6427266bf9da0d25dae99d644254fccc6615e93 Parents: 24b48f3 Author: Likitha Shetty <[email protected]> Authored: Fri Feb 15 17:24:59 2013 +0530 Committer: Likitha Shetty <[email protected]> Committed: Fri Feb 15 17:24:59 2013 +0530 ---------------------------------------------------------------------- .../src/com/cloud/network/NetworkServiceImpl.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a6427266/server/src/com/cloud/network/NetworkServiceImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java index 70f0fa8..37b4903 100755 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -1711,7 +1711,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { // 4) if network has been upgraded from a non persistent ntwk offering to a persistent ntwk offering, // implement the network if its not already - if ( !oldNtwkOff.getIsPersistent() && networkOffering.getIsPersistent()) { + if ( networkOfferingChanged && !oldNtwkOff.getIsPersistent() && networkOffering.getIsPersistent()) { if( network.getState() == Network.State.Allocated) { try { DeployDestination dest = new DeployDestination(_dcDao.findById(network.getDataCenterId()), null, null, null);
