cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject [2/4] git commit: updated refs/heads/master to 57ba367
Date Fri, 08 Nov 2013 08:01:13 GMT
CLOUDSTACK-5042: fix NPE error as BroadcastUri is NULL in shared network after upgrade from
2.2.14 (Cherry-picked from commit 09e7ab9750df27d96159bbcf3f41bafc33ac6fbe)


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

Branch: refs/heads/master
Commit: 958312de4cdf1c6e79f9b1f119b91568baf7ba90
Parents: c2fc6e6
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Thu Nov 7 11:07:24 2013 +0100
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Fri Nov 8 09:00:15 2013 +0100

----------------------------------------------------------------------
 server/src/com/cloud/network/IpAddressManagerImpl.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/958312de/server/src/com/cloud/network/IpAddressManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java b/server/src/com/cloud/network/IpAddressManagerImpl.java
index 8619ae1..2c54137 100644
--- a/server/src/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/com/cloud/network/IpAddressManagerImpl.java
@@ -1892,7 +1892,10 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
                         //nic.setBroadcastType(BroadcastDomainType.Vlan);
                         //nic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(ip.getVlanTag()));
                         nic.setBroadcastType(network.getBroadcastDomainType());
-                        nic.setBroadcastUri(network.getBroadcastUri());
+                        if (network.getBroadcastUri() != null)
+                            nic.setBroadcastUri(network.getBroadcastUri());
+                        else
+                            nic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(ip.getVlanTag()));
                         nic.setFormat(AddressFormat.Ip4);
                         nic.setReservationId(String.valueOf(ip.getVlanTag()));
                         nic.setMacAddress(ip.getMacAddress());


Mime
View raw message