incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From likit...@apache.org
Subject git commit: refs/heads/4.1 - CLOUDSTACK-1207. UpdateNetwork API fails with NPE if the network offering is not being updated and is non-persistent.
Date Fri, 15 Feb 2013 11:59:11 GMT
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 <likitha.shetty@citrix.com>
Authored: Fri Feb 15 17:24:59 2013 +0530
Committer: Likitha Shetty <likitha.shetty@citrix.com>
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);


Mime
View raw message