You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by li...@apache.org on 2013/02/15 12:52:21 UTC

git commit: refs/heads/master - CLOUDSTACK-1207. UpdateNetwork API fails with NPE if the network offering is not being updated and is non-persistent.

Updated Branches:
  refs/heads/master bc493bd39 -> 3c764c0be


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/3c764c0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/3c764c0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/3c764c0b

Branch: refs/heads/master
Commit: 3c764c0be759bc3f05eec77998bbba647f03b686
Parents: bc493bd
Author: Likitha Shetty <li...@citrix.com>
Authored: Fri Feb 15 16:46:01 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Fri Feb 15 17:18:43 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/3c764c0b/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);