diff options
author | Jeff Ames | 2008-03-19 09:36:13 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-19 09:36:13 +0000 |
commit | a0e1be3280e4be49cf0ca8d211b97ef8c1ddee2f (patch) | |
tree | be64babdd6f1bcb2a946d637b81739445facdd31 /OpenSim/Region/Environment | |
parent | * Add a large amount of extra locking to m_parts in SceneObjectGroup (diff) | |
download | opensim-SC_OLD-a0e1be3280e4be49cf0ca8d211b97ef8c1ddee2f.zip opensim-SC_OLD-a0e1be3280e4be49cf0ca8d211b97ef8c1ddee2f.tar.gz opensim-SC_OLD-a0e1be3280e4be49cf0ca8d211b97ef8c1ddee2f.tar.bz2 opensim-SC_OLD-a0e1be3280e4be49cf0ca8d211b97ef8c1ddee2f.tar.xz |
Fixed some comparisons of LLUUIDs to null.
Thanks to DrSchofld for pointing this out.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/XMLRPCModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/PermissionManager.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | 4 |
3 files changed, 7 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs index 67ebbf8..4f52ad6 100644 --- a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs | |||
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules | |||
163 | 163 | ||
164 | public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID) | 164 | public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID) |
165 | { | 165 | { |
166 | LLUUID channel = null; | 166 | LLUUID channel = new LLUUID(); |
167 | 167 | ||
168 | //Is a dupe? | 168 | //Is a dupe? |
169 | foreach (RPCChannelInfo ci in m_openChannels.Values) | 169 | foreach (RPCChannelInfo ci in m_openChannels.Values) |
@@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Modules | |||
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | if ((channel.Equals(null)) || (channel.Equals(LLUUID.Zero))) | 179 | if (channel == LLUUID.Zero) |
180 | { | 180 | { |
181 | channel = LLUUID.Random(); | 181 | channel = LLUUID.Random(); |
182 | RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, channel); | 182 | RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, channel); |
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs index a23f119..3d008a7 100644 --- a/OpenSim/Region/Environment/PermissionManager.cs +++ b/OpenSim/Region/Environment/PermissionManager.cs | |||
@@ -82,7 +82,7 @@ namespace OpenSim.Region.Environment | |||
82 | } | 82 | } |
83 | 83 | ||
84 | // If there is no master avatar, return false | 84 | // If there is no master avatar, return false |
85 | if (!m_scene.RegionInfo.MasterAvatarAssignedUUID.Equals(null)) | 85 | if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) |
86 | { | 86 | { |
87 | return m_scene.RegionInfo.MasterAvatarAssignedUUID == user; | 87 | return m_scene.RegionInfo.MasterAvatarAssignedUUID == user; |
88 | } | 88 | } |
@@ -96,7 +96,8 @@ namespace OpenSim.Region.Environment | |||
96 | { | 96 | { |
97 | return true; | 97 | return true; |
98 | } | 98 | } |
99 | if (!user.Equals(null)) | 99 | |
100 | if (user != LLUUID.Zero) | ||
100 | { | 101 | { |
101 | LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers; | 102 | LLUUID[] estatemanagers = m_scene.RegionInfo.EstateSettings.estateManagers; |
102 | for (int i = 0; i < estatemanagers.Length; i++) | 103 | for (int i = 0; i < estatemanagers.Length; i++) |
@@ -105,11 +106,6 @@ namespace OpenSim.Region.Environment | |||
105 | return true; | 106 | return true; |
106 | } | 107 | } |
107 | } | 108 | } |
108 | // The below is commented out because logically it happens anyway. It's left in for readability | ||
109 | //else | ||
110 | //{ | ||
111 | //return false; | ||
112 | //} | ||
113 | 109 | ||
114 | return false; | 110 | return false; |
115 | } | 111 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index e02faaf..967ba0b 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -178,8 +178,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
178 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, | 178 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, |
179 | InventoryItemBase item, LLUUID copyItemID) | 179 | InventoryItemBase item, LLUUID copyItemID) |
180 | { | 180 | { |
181 | LLUUID newItemId = (!copyItemID.Equals(null)) ? copyItemID : item.inventoryID; | 181 | LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.inventoryID; |
182 | 182 | ||
183 | SceneObjectPart part = GetChildPart(localID); | 183 | SceneObjectPart part = GetChildPart(localID); |
184 | if (part != null) | 184 | if (part != null) |
185 | { | 185 | { |