diff options
author | diva | 2009-02-14 16:37:55 +0000 |
---|---|---|
committer | diva | 2009-02-14 16:37:55 +0000 |
commit | 217ffee8cb50e0a7ddfc0d4c4e4bb6a68de909d8 (patch) | |
tree | 3131df695140a7846fcd86b689c9a9afe5ee880f /OpenSim/Region/Framework | |
parent | Thank you, patnad, for a patch that removes the "Subdivision of" text (diff) | |
download | opensim-SC_OLD-217ffee8cb50e0a7ddfc0d4c4e4bb6a68de909d8.zip opensim-SC_OLD-217ffee8cb50e0a7ddfc0d4c4e4bb6a68de909d8.tar.gz opensim-SC_OLD-217ffee8cb50e0a7ddfc0d4c4e4bb6a68de909d8.tar.bz2 opensim-SC_OLD-217ffee8cb50e0a7ddfc0d4c4e4bb6a68de909d8.tar.xz |
Moved RegionUp to REST/LocalComms. The original functionality has been entirely maintained, although it will have to be revisited soon, because it's buggy.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IInterregionComms.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 10 |
3 files changed, 38 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs index d3f44bb..0b62df2 100644 --- a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs | |||
@@ -32,8 +32,11 @@ namespace OpenSim.Region.Framework.Interfaces | |||
32 | { | 32 | { |
33 | public delegate bool ChildAgentUpdateReceived(AgentData data); | 33 | public delegate bool ChildAgentUpdateReceived(AgentData data); |
34 | 34 | ||
35 | public interface IInterregionCommsOut | 35 | public interface IInterregionCommsOut |
36 | { | 36 | { |
37 | |||
38 | #region Agents | ||
39 | |||
37 | bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit); | 40 | bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit); |
38 | 41 | ||
39 | /// <summary> | 42 | /// <summary> |
@@ -70,8 +73,26 @@ namespace OpenSim.Region.Framework.Interfaces | |||
70 | /// <returns></returns> | 73 | /// <returns></returns> |
71 | bool SendCloseAgent(ulong regionHandle, UUID id); | 74 | bool SendCloseAgent(ulong regionHandle, UUID id); |
72 | 75 | ||
76 | #endregion Agents | ||
77 | |||
78 | #region Objects | ||
79 | |||
80 | /// <summary> | ||
81 | /// Create an object in the destination region. This message is used primarily for prim crossing. | ||
82 | /// </summary> | ||
83 | /// <param name="regionHandle"></param> | ||
84 | /// <param name="sog"></param> | ||
85 | /// <param name="isLocalCall"></param> | ||
86 | /// <returns></returns> | ||
73 | bool SendCreateObject(ulong regionHandle, ISceneObject sog, bool isLocalCall); | 87 | bool SendCreateObject(ulong regionHandle, ISceneObject sog, bool isLocalCall); |
74 | 88 | ||
89 | #endregion Objects | ||
90 | |||
91 | #region Regions | ||
92 | |||
93 | bool SendHelloNeighbour(ulong regionHandle, RegionInfo thisRegion); | ||
94 | |||
95 | #endregion Regions | ||
75 | } | 96 | } |
76 | 97 | ||
77 | // This may not be needed, but having it here for now. | 98 | // This may not be needed, but having it here for now. |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c31e6f7..b42c46e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -422,6 +422,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
422 | /// <returns>True after all operations complete, throws exceptions otherwise.</returns> | 422 | /// <returns>True after all operations complete, throws exceptions otherwise.</returns> |
423 | public override bool OtherRegionUp(RegionInfo otherRegion) | 423 | public override bool OtherRegionUp(RegionInfo otherRegion) |
424 | { | 424 | { |
425 | m_log.InfoFormat("[SCENE]: Region {0} up in coords {1}-{2}", otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY); | ||
426 | |||
425 | if (RegionInfo.RegionHandle != otherRegion.RegionHandle) | 427 | if (RegionInfo.RegionHandle != otherRegion.RegionHandle) |
426 | { | 428 | { |
427 | for (int i = 0; i < m_neighbours.Count; i++) | 429 | for (int i = 0; i < m_neighbours.Count; i++) |
@@ -517,6 +519,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
517 | return found; | 519 | return found; |
518 | } | 520 | } |
519 | 521 | ||
522 | |||
523 | // Alias IncomingHelloNeighbour OtherRegionUp, for now | ||
524 | public bool IncomingHelloNeighbour(RegionInfo neighbour) | ||
525 | { | ||
526 | return OtherRegionUp(neighbour); | ||
527 | } | ||
528 | |||
520 | /// <summary> | 529 | /// <summary> |
521 | /// Given float seconds, this will restart the region. | 530 | /// Given float seconds, this will restart the region. |
522 | /// </summary> | 531 | /// </summary> |
@@ -2569,7 +2578,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2569 | /// <param name="region"></param> | 2578 | /// <param name="region"></param> |
2570 | public void InformClientOfNeighbor(ScenePresence presence, RegionInfo region) | 2579 | public void InformClientOfNeighbor(ScenePresence presence, RegionInfo region) |
2571 | { | 2580 | { |
2572 | m_sceneGridService.InformNeighborChildAgent(presence, region, m_neighbours); | 2581 | m_sceneGridService.InformNeighborChildAgent(presence, region); |
2573 | } | 2582 | } |
2574 | 2583 | ||
2575 | /// <summary> | 2584 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 2f0bbb2..4c10e2c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -459,7 +459,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
459 | /// This informs a single neighboring region about agent "avatar". | 459 | /// This informs a single neighboring region about agent "avatar". |
460 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. | 460 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. |
461 | /// </summary> | 461 | /// </summary> |
462 | public void InformNeighborChildAgent(ScenePresence avatar, SimpleRegionInfo region, List<RegionInfo> neighbours) | 462 | public void InformNeighborChildAgent(ScenePresence avatar, SimpleRegionInfo region) |
463 | { | 463 | { |
464 | AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); | 464 | AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); |
465 | agent.BaseFolder = UUID.Zero; | 465 | agent.BaseFolder = UUID.Zero; |
@@ -493,8 +493,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
493 | m_log.Info("[INTERGRID]: Starting to inform neighbors that I'm here"); | 493 | m_log.Info("[INTERGRID]: Starting to inform neighbors that I'm here"); |
494 | //RegionUpData regiondata = new RegionUpData(region.RegionLocX, region.RegionLocY, region.ExternalHostName, region.InternalEndPoint.Port); | 494 | //RegionUpData regiondata = new RegionUpData(region.RegionLocX, region.RegionLocY, region.ExternalHostName, region.InternalEndPoint.Port); |
495 | 495 | ||
496 | bool regionAccepted = | 496 | //bool regionAccepted = |
497 | m_commsProvider.InterRegion.RegionUp(new SerializableRegionInfo(region), regionhandle); | 497 | // m_commsProvider.InterRegion.RegionUp(new SerializableRegionInfo(region), regionhandle); |
498 | |||
499 | bool regionAccepted = m_interregionCommsOut.SendHelloNeighbour(regionhandle, region); | ||
498 | 500 | ||
499 | if (regionAccepted) | 501 | if (regionAccepted) |
500 | { | 502 | { |
@@ -519,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
519 | { | 521 | { |
520 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); | 522 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); |
521 | 523 | ||
522 | 524 | ||
523 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); | 525 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); |
524 | // This stays uncached because we don't already know about our neighbors at this point. | 526 | // This stays uncached because we don't already know about our neighbors at this point. |
525 | neighbours = m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); | 527 | neighbours = m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY); |