aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2014-08-20 17:54:23 +0100
committerUbitUmarov2014-08-20 17:54:23 +0100
commit16cf3967b4b2929e20f13a5d9ae91dc0e7ac03ef (patch)
tree7e65e8ad1edd17db5343e560498aa97ad4f3e13c /OpenSim/Region/Framework
parentsending attachment kills before putting them back doesnt cover all cases (diff)
downloadopensim-SC-16cf3967b4b2929e20f13a5d9ae91dc0e7ac03ef.zip
opensim-SC-16cf3967b4b2929e20f13a5d9ae91dc0e7ac03ef.tar.gz
opensim-SC-16cf3967b4b2929e20f13a5d9ae91dc0e7ac03ef.tar.bz2
opensim-SC-16cf3967b4b2929e20f13a5d9ae91dc0e7ac03ef.tar.xz
Reserve a extra localID for a presence ( it will be localID + 1 )
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
2 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index dd0c828..f5be7a7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -295,6 +295,18 @@ namespace OpenSim.Region.Framework.Scenes
295 295
296 return myID; 296 return myID;
297 } 297 }
298
299 public uint AllocatePresenceLocalId()
300 {
301 uint myID;
302
303 _primAllocateMutex.WaitOne();
304 myID = ++m_lastAllocatedLocalId;
305 ++m_lastAllocatedLocalId;
306 _primAllocateMutex.ReleaseMutex();
307
308 return myID;
309 }
298 310
299 #region Module Methods 311 #region Module Methods
300 312
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 864f54d..5ebf3db 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -969,7 +969,7 @@ namespace OpenSim.Region.Framework.Scenes
969 m_name = String.Format("{0} {1}", Firstname, Lastname); 969 m_name = String.Format("{0} {1}", Firstname, Lastname);
970 m_scene = world; 970 m_scene = world;
971 m_uuid = client.AgentId; 971 m_uuid = client.AgentId;
972 LocalId = m_scene.AllocateLocalId(); 972 LocalId = m_scene.AllocatePresenceLocalId();
973 973
974 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid); 974 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
975 if (account != null) 975 if (account != null)