aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJeff Ames2008-03-19 09:36:13 +0000
committerJeff Ames2008-03-19 09:36:13 +0000
commita0e1be3280e4be49cf0ca8d211b97ef8c1ddee2f (patch)
treebe64babdd6f1bcb2a946d637b81739445facdd31
parent* Add a large amount of extra locking to m_parts in SceneObjectGroup (diff)
downloadopensim-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/Framework/Communications/UserManagerBase.cs6
-rw-r--r--OpenSim/Framework/RegionInfo.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/XMLRPCModule.cs4
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs6
6 files changed, 13 insertions, 19 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index d3ebbb0..5ba37e6 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -439,17 +439,15 @@ namespace OpenSim.Framework.UserManagement
439 userAgent.agentOnline = false; 439 userAgent.agentOnline = false;
440 userAgent.logoutTime = Util.UnixTimeSinceEpoch(); 440 userAgent.logoutTime = Util.UnixTimeSinceEpoch();
441 //userAgent.sessionID = LLUUID.Zero; 441 //userAgent.sessionID = LLUUID.Zero;
442 if (regionid != null) 442 if (regionid != LLUUID.Zero)
443 { 443 {
444 userAgent.currentRegion = regionid; 444 userAgent.currentRegion = regionid;
445 } 445 }
446 userAgent.currentHandle = regionhandle;
447 446
447 userAgent.currentHandle = regionhandle;
448 userAgent.currentPos = currentPos; 448 userAgent.currentPos = currentPos;
449
450 userProfile.currentAgent = userAgent; 449 userProfile.currentAgent = userAgent;
451 450
452
453 CommitAgent(ref userProfile); 451 CommitAgent(ref userProfile);
454 } 452 }
455 else 453 else
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 03db1a6..76ae1ba 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -359,7 +359,7 @@ namespace OpenSim.Framework
359 359
360 public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) 360 public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
361 { 361 {
362 if (MasterAvatarAssignedUUID.Equals(null) || MasterAvatarAssignedUUID.ToString() == LLUUID.Zero.ToString()) 362 if (MasterAvatarAssignedUUID == LLUUID.Zero)
363 { 363 {
364 return true; 364 return true;
365 } 365 }
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 {
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 9eadbb4..85cf0b7 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3339,7 +3339,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3339 { 3339 {
3340 m_host.AddScriptLPS(1); 3340 m_host.AddScriptLPS(1);
3341 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 3341 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
3342 if (landowner.Equals(null)) 3342 if (landowner == LLUUID.Zero)
3343 { 3343 {
3344 return; 3344 return;
3345 } 3345 }
@@ -3355,7 +3355,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3355 m_host.AddScriptLPS(1); 3355 m_host.AddScriptLPS(1);
3356 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 3356 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
3357 3357
3358 if(landowner.Equals(null)) 3358 if(landowner == LLUUID.Zero)
3359 { 3359 {
3360 return; 3360 return;
3361 } 3361 }
@@ -4306,7 +4306,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4306 LLUUID reqID = httpScriptMod. 4306 LLUUID reqID = httpScriptMod.
4307 StartHttpRequest(m_localID, m_itemID, url, param, body); 4307 StartHttpRequest(m_localID, m_itemID, url, param, body);
4308 4308
4309 if (!reqID.Equals(null)) 4309 if (reqID != LLUUID.Zero)
4310 return reqID.ToString(); 4310 return reqID.ToString();
4311 else 4311 else
4312 return null; 4312 return null;