diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index 91a808b..72c00fc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | |||
@@ -104,6 +104,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
104 | 104 | ||
105 | public void PostInitialise() | 105 | public void PostInitialise() |
106 | { | 106 | { |
107 | if (m_LocalGridService != null) | ||
108 | ((ISharedRegionModule)m_LocalGridService).PostInitialise(); | ||
107 | } | 109 | } |
108 | 110 | ||
109 | public void Close() | 111 | public void Close() |
@@ -112,14 +114,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
112 | 114 | ||
113 | public void AddRegion(Scene scene) | 115 | public void AddRegion(Scene scene) |
114 | { | 116 | { |
115 | if (!m_Enabled) | 117 | if (m_Enabled) |
116 | return; | 118 | scene.RegisterModuleInterface<IGridService>(this); |
117 | 119 | ||
118 | scene.RegisterModuleInterface<IGridService>(this); | 120 | if (m_LocalGridService != null) |
121 | ((ISharedRegionModule)m_LocalGridService).AddRegion(scene); | ||
119 | } | 122 | } |
120 | 123 | ||
121 | public void RemoveRegion(Scene scene) | 124 | public void RemoveRegion(Scene scene) |
122 | { | 125 | { |
126 | if (m_LocalGridService != null) | ||
127 | ((ISharedRegionModule)m_LocalGridService).RemoveRegion(scene); | ||
123 | } | 128 | } |
124 | 129 | ||
125 | public void RegionLoaded(Scene scene) | 130 | public void RegionLoaded(Scene scene) |
@@ -146,7 +151,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
146 | return false; | 151 | return false; |
147 | } | 152 | } |
148 | 153 | ||
149 | // Let's not override GetNeighbours -- let's get them all from the grid server | 154 | // Let's override GetNeighbours completely -- never go to the grid server |
155 | // Neighbours are/should be cached locally | ||
156 | // For retrieval from the DB, caller should call GetRegionByPosition | ||
157 | public override List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID) | ||
158 | { | ||
159 | return m_LocalGridService.GetNeighbours(scopeID, regionID); | ||
160 | } | ||
150 | 161 | ||
151 | public override GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) | 162 | public override GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) |
152 | { | 163 | { |