Skip to content

Commit 3c764c0

Browse files
author
Likitha Shetty
committed
CLOUDSTACK-1207. UpdateNetwork API fails with NPE if the network offering is not being updated and is non-persistent.
1 parent bc493bd commit 3c764c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/com/cloud/network/NetworkServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1711,7 +1711,7 @@ public Network updateGuestNetwork(long networkId, String name, String displayTex
17111711

17121712
// 4) if network has been upgraded from a non persistent ntwk offering to a persistent ntwk offering,
17131713
// implement the network if its not already
1714-
if ( !oldNtwkOff.getIsPersistent() && networkOffering.getIsPersistent()) {
1714+
if ( networkOfferingChanged && !oldNtwkOff.getIsPersistent() && networkOffering.getIsPersistent()) {
17151715
if( network.getState() == Network.State.Allocated) {
17161716
try {
17171717
DeployDestination dest = new DeployDestination(_dcDao.findById(network.getDataCenterId()), null, null, null);

0 commit comments

Comments
 (0)