aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-09-08 18:03:17 +0200
committerMelanie2012-09-08 18:03:17 +0200
commitd734c1985cb442567437074e854ed77c3d9d61bc (patch)
tree9869d99b275f6d6ecf84d6191cc124a80ff4dbdc /OpenSim
parentSet the maximum number of concurrent connections to a service endpoint (diff)
parent llClientView: try to have only one thread per client processing (diff)
downloadopensim-SC_OLD-d734c1985cb442567437074e854ed77c3d9d61bc.zip
opensim-SC_OLD-d734c1985cb442567437074e854ed77c3d9d61bc.tar.gz
opensim-SC_OLD-d734c1985cb442567437074e854ed77c3d9d61bc.tar.bz2
opensim-SC_OLD-d734c1985cb442567437074e854ed77c3d9d61bc.tar.xz
Merge branch 'ubitwork' into avination
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs53
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs57
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs4
4 files changed, 93 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index e78ebed..7749ef3 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -8751,16 +8751,61 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8751 8751
8752 #region Parcel related packets 8752 #region Parcel related packets
8753 8753
8754 // acumulate several HandleRegionHandleRequest consecutive overlaping requests
8755 // to be done with minimal resources as possible
8756 // variables temporary here while in test
8757
8758 Queue<UUID> RegionHandleRequests = new Queue<UUID>();
8759 bool RegionHandleRequestsInService = false;
8760
8754 private bool HandleRegionHandleRequest(IClientAPI sender, Packet Pack) 8761 private bool HandleRegionHandleRequest(IClientAPI sender, Packet Pack)
8755 { 8762 {
8756 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; 8763 UUID currentUUID;
8757 8764
8758 RegionHandleRequest handlerRegionHandleRequest = OnRegionHandleRequest; 8765 RegionHandleRequest handlerRegionHandleRequest = OnRegionHandleRequest;
8759 if (handlerRegionHandleRequest != null) 8766
8767 if (handlerRegionHandleRequest == null)
8768 return true;
8769
8770 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
8771
8772 lock (RegionHandleRequests)
8773 {
8774 if (RegionHandleRequestsInService)
8775 {
8776 // we are already busy doing a previus request
8777 // so enqueue it
8778 RegionHandleRequests.Enqueue(rhrPack.RequestBlock.RegionID);
8779 return true;
8780 }
8781
8782 // else do it
8783 currentUUID = rhrPack.RequestBlock.RegionID;
8784 RegionHandleRequestsInService = true;
8785 }
8786
8787 while (true)
8760 { 8788 {
8761 handlerRegionHandleRequest(this, rhrPack.RequestBlock.RegionID); 8789 handlerRegionHandleRequest(this, currentUUID);
8790
8791 lock (RegionHandleRequests)
8792 {
8793 // exit condition, nothing to do or closed
8794 // current code seems to assume we may loose the handler at anytime,
8795 // so keep checking it
8796 handlerRegionHandleRequest = OnRegionHandleRequest;
8797
8798 if (RegionHandleRequests.Count == 0 || !IsActive || handlerRegionHandleRequest == null)
8799 {
8800 RegionHandleRequests.Clear();
8801 RegionHandleRequestsInService = false;
8802 return true;
8803 }
8804 currentUUID = RegionHandleRequests.Dequeue();
8805 }
8762 } 8806 }
8763 return true; 8807
8808 return true; // actually unreached
8764 } 8809 }
8765 8810
8766 private bool HandleParcelInfoRequest(IClientAPI sender, Packet Pack) 8811 private bool HandleParcelInfoRequest(IClientAPI sender, Packet Pack)
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 8bc81ae..aae6603 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -401,30 +401,51 @@ namespace OpenSim.Region.CoreModules.World.Land
401 401
402 public void SendLandUpdate(ScenePresence avatar, bool force) 402 public void SendLandUpdate(ScenePresence avatar, bool force)
403 { 403 {
404
405 /* stop sendind same data twice
406 ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
407 (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y))));
408
409 if (over != null)
410 {
411
412 if (force)
413 {
414 if (!avatar.IsChildAgent)
415 {
416 over.SendLandUpdateToClient(avatar.ControllingClient);
417 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
418 m_scene.RegionInfo.RegionID);
419 }
420 }
421
422 if (avatar.currentParcelUUID != over.LandData.GlobalID)
423 {
424 if (!avatar.IsChildAgent)
425 {
426 over.SendLandUpdateToClient(avatar.ControllingClient);
427 avatar.currentParcelUUID = over.LandData.GlobalID;
428 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
429 m_scene.RegionInfo.RegionID);
430 }
431 }
432 */
433 if (avatar.IsChildAgent)
434 return;
435
404 ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), 436 ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))),
405 (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); 437 (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y))));
406 438
407 if (over != null) 439 if (over != null)
408 { 440 {
409 if (force) 441 bool NotsameID = (avatar.currentParcelUUID != over.LandData.GlobalID);
442 if (force || NotsameID)
410 { 443 {
411 if (!avatar.IsChildAgent) 444 over.SendLandUpdateToClient(avatar.ControllingClient);
412 { 445 if (NotsameID)
413 over.SendLandUpdateToClient(avatar.ControllingClient);
414 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
415 m_scene.RegionInfo.RegionID);
416 }
417 }
418
419 if (avatar.currentParcelUUID != over.LandData.GlobalID)
420 {
421 if (!avatar.IsChildAgent)
422 {
423 over.SendLandUpdateToClient(avatar.ControllingClient);
424 avatar.currentParcelUUID = over.LandData.GlobalID; 446 avatar.currentParcelUUID = over.LandData.GlobalID;
425 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, 447 m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID,
426 m_scene.RegionInfo.RegionID); 448 m_scene.RegionInfo.RegionID);
427 }
428 } 449 }
429 } 450 }
430 } 451 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0237021..0dae946 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2890,9 +2890,11 @@ namespace OpenSim.Region.Framework.Scenes
2890 { 2890 {
2891 EventManager.TriggerOnClientLogin(client); 2891 EventManager.TriggerOnClientLogin(client);
2892 // Send initial parcel data 2892 // Send initial parcel data
2893/* this is done on TriggerOnNewClient by landmanegement respective event handler
2893 Vector3 pos = sp.AbsolutePosition; 2894 Vector3 pos = sp.AbsolutePosition;
2894 ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y); 2895 ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y);
2895 land.SendLandUpdateToClient(client); 2896 land.SendLandUpdateToClient(client);
2897*/
2896 } 2898 }
2897 2899
2898 return sp; 2900 return sp;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 433efc7..a8aa551 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1315,13 +1315,15 @@ namespace OpenSim.Region.Framework.Scenes
1315 // Create child agents in neighbouring regions 1315 // Create child agents in neighbouring regions
1316 if (openChildAgents && !IsChildAgent) 1316 if (openChildAgents && !IsChildAgent)
1317 { 1317 {
1318
1318 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 1319 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1319 if (m_agentTransfer != null) 1320 if (m_agentTransfer != null)
1320 Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); }); 1321 m_agentTransfer.EnableChildAgents(this);
1321 1322
1322 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); 1323 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
1323 if (friendsModule != null) 1324 if (friendsModule != null)
1324 friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); 1325 friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
1326
1325 } 1327 }
1326 1328
1327// m_log.DebugFormat( 1329// m_log.DebugFormat(