diff options
author | Diva Canto | 2009-10-06 15:39:53 -0700 |
---|---|---|
committer | Diva Canto | 2009-10-06 15:39:53 -0700 |
commit | e992ca025571a891333a57012c2cd4419b6581e5 (patch) | |
tree | a6fd7e9f2e46999c72780bf60d2890e8a9c74fe4 /OpenSim/Region/CoreModules/Avatar/InstantMessage | |
parent | * Change some more default ports to the robust default of 8003 (diff) | |
download | opensim-SC-e992ca025571a891333a57012c2cd4419b6581e5.zip opensim-SC-e992ca025571a891333a57012c2cd4419b6581e5.tar.gz opensim-SC-e992ca025571a891333a57012c2cd4419b6581e5.tar.bz2 opensim-SC-e992ca025571a891333a57012c2cd4419b6581e5.tar.xz |
Rewrote parts of the code that were double-locking different objects. This is about half of the code base reviewed.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs index ad05bab..42dd7ff 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs | |||
@@ -290,13 +290,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
290 | 290 | ||
291 | // get the agent. This should work every time, as we just got a packet from it | 291 | // get the agent. This should work every time, as we just got a packet from it |
292 | ScenePresence agent = null; | 292 | ScenePresence agent = null; |
293 | List<Scene> scenes = null; | ||
293 | lock (m_Scenes) | 294 | lock (m_Scenes) |
295 | scenes = new List<Scene>(m_Scenes); | ||
296 | |||
297 | foreach (Scene scene in scenes) | ||
294 | { | 298 | { |
295 | foreach (Scene scene in m_Scenes) | 299 | agent = scene.GetScenePresence(agentID); |
296 | { | 300 | if (agent != null) break; |
297 | agent = scene.GetScenePresence(agentID); | ||
298 | if (agent != null) break; | ||
299 | } | ||
300 | } | 301 | } |
301 | 302 | ||
302 | // just to be paranoid... | 303 | // just to be paranoid... |