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/4.2 to de448ec
Date Thu, 07 Nov 2013 10:09:35 GMT
CLOUDSTACK-5042: fix NPE error as BroadcastUri is NULL in shared network after upgrade from
2.2.14


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

Branch: refs/heads/4.2
Commit: 09e7ab9750df27d96159bbcf3f41bafc33ac6fbe
Parents: a33f0e7
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Thu Nov 7 11:07:24 2013 +0100
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Thu Nov 7 11:07:24 2013 +0100

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09e7ab97/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index 9c4f777..1e278ef 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -4505,7 +4505,10 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
     			//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