aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs29
1 files changed, 18 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 3a16b91..7385725 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -33,6 +33,7 @@ using System.Threading;
33using OpenMetaverse; 33using OpenMetaverse;
34using OpenMetaverse.StructuredData; 34using OpenMetaverse.StructuredData;
35using log4net; 35using log4net;
36using OpenSim.Region.Environment.Interfaces;
36using OpenSim.Framework; 37using OpenSim.Framework;
37using OpenSim.Framework.Communications; 38using OpenSim.Framework.Communications;
38using OpenSim.Region.Interfaces; 39using OpenSim.Region.Interfaces;
@@ -49,6 +50,7 @@ namespace OpenSim.Region.Environment.Scenes
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 51
51 protected CommunicationsManager m_commsProvider; 52 protected CommunicationsManager m_commsProvider;
53 protected IInterregionCommsOut m_interregionCommsOut;
52 protected RegionInfo m_regionInfo; 54 protected RegionInfo m_regionInfo;
53 55
54 protected RegionCommsListener regionCommsHost; 56 protected RegionCommsListener regionCommsHost;
@@ -87,8 +89,10 @@ namespace OpenSim.Region.Environment.Scenes
87 /// </summary> 89 /// </summary>
88 /// <param name="regionInfos"></param> 90 /// <param name="regionInfos"></param>
89 /// <exception cref="System.Exception">Thrown if region registration fails.</exception> 91 /// <exception cref="System.Exception">Thrown if region registration fails.</exception>
90 public void RegisterRegion(RegionInfo regionInfos) 92 public void RegisterRegion(IInterregionCommsOut comms_out, RegionInfo regionInfos)
91 { 93 {
94 m_interregionCommsOut = comms_out;
95
92 m_regionInfo = regionInfos; 96 m_regionInfo = regionInfos;
93 m_commsProvider.GridService.gdebugRegionName = regionInfos.RegionName; 97 m_commsProvider.GridService.gdebugRegionName = regionInfos.RegionName;
94 m_commsProvider.InterRegion.rdebugRegionName = regionInfos.RegionName; 98 m_commsProvider.InterRegion.rdebugRegionName = regionInfos.RegionName;
@@ -531,7 +535,7 @@ namespace OpenSim.Region.Environment.Scenes
531 //bool val = m_commsProvider.InterRegion.RegionUp(new SerializableRegionInfo(region)); 535 //bool val = m_commsProvider.InterRegion.RegionUp(new SerializableRegionInfo(region));
532 } 536 }
533 537
534 public delegate void SendChildAgentDataUpdateDelegate(ChildAgentDataUpdate cAgentData, ulong regionHandle); 538 public delegate void SendChildAgentDataUpdateDelegate(AgentData cAgentData, ulong regionHandle);
535 539
536 /// <summary> 540 /// <summary>
537 /// This informs all neighboring regions about the settings of it's child agent. 541 /// This informs all neighboring regions about the settings of it's child agent.
@@ -540,13 +544,14 @@ namespace OpenSim.Region.Environment.Scenes
540 /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. 544 /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc.
541 /// 545 ///
542 /// </summary> 546 /// </summary>
543 private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ulong regionHandle) 547 private void SendChildAgentDataUpdateAsync(AgentData cAgentData, ulong regionHandle)
544 { 548 {
545 //m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + presence.Scene.RegionInfo.RegionName); 549 m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName);
546 //bool regionAccepted = m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData); 550 //bool regionAccepted = m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData);
547 try 551 try
548 { 552 {
549 m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData); 553 //m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData);
554 m_interregionCommsOut.SendChildAgentUpdate(regionHandle, cAgentData);
550 } 555 }
551 catch 556 catch
552 { 557 {
@@ -570,18 +575,20 @@ namespace OpenSim.Region.Environment.Scenes
570 icon.EndInvoke(iar); 575 icon.EndInvoke(iar);
571 } 576 }
572 577
573 public void SendChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, ScenePresence presence) 578 public void SendChildAgentDataUpdate(AgentData cAgentData, ScenePresence presence)
574 { 579 {
575 // This assumes that we know what our neighbors are. 580 // This assumes that we know what our neighbors are.
576 try 581 try
577 { 582 {
578 foreach (ulong regionHandle in presence.KnownChildRegionHandles) 583 foreach (ulong regionHandle in presence.KnownChildRegionHandles)
579 { 584 {
580 585 if (regionHandle != m_regionInfo.RegionHandle)
581 SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; 586 {
582 d.BeginInvoke(cAgentData, regionHandle, 587 SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
583 SendChildAgentDataUpdateCompleted, 588 d.BeginInvoke(cAgentData, regionHandle,
584 d); 589 SendChildAgentDataUpdateCompleted,
590 d);
591 }
585 } 592 }
586 } 593 }
587 catch (InvalidOperationException) 594 catch (InvalidOperationException)