diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Communications')
-rw-r--r-- | OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs | 67 |
2 files changed, 50 insertions, 26 deletions
diff --git a/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs index e5a01ef..3997258 100644 --- a/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs +++ b/OpenSim/Region/CoreModules/Communications/Local/LocalInterregionComms.cs | |||
@@ -260,6 +260,15 @@ namespace OpenSim.Region.CoreModules.Communications.Local | |||
260 | // ? weird. should not happen | 260 | // ? weird. should not happen |
261 | return m_sceneList[0].RegionInfo.RegionID; | 261 | return m_sceneList[0].RegionInfo.RegionID; |
262 | } | 262 | } |
263 | |||
264 | public bool IsLocalRegion(ulong regionhandle) | ||
265 | { | ||
266 | foreach (Scene s in m_sceneList) | ||
267 | if (s.RegionInfo.RegionHandle == regionhandle) | ||
268 | return true; | ||
269 | return false; | ||
270 | } | ||
271 | |||
263 | #endregion | 272 | #endregion |
264 | } | 273 | } |
265 | } | 274 | } |
diff --git a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs index 32eedef..498ffd5 100644 --- a/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/Communications/REST/RESTInterregionComms.cs | |||
@@ -136,15 +136,18 @@ namespace OpenSim.Region.CoreModules.Communications.REST | |||
136 | return true; | 136 | return true; |
137 | 137 | ||
138 | // else do the remote thing | 138 | // else do the remote thing |
139 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); | 139 | if (!m_localBackend.IsLocalRegion(regionHandle)) |
140 | if (regInfo != null) | ||
141 | { | 140 | { |
142 | SendUserInformation(regInfo, aCircuit); | 141 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); |
142 | if (regInfo != null) | ||
143 | { | ||
144 | SendUserInformation(regInfo, aCircuit); | ||
143 | 145 | ||
144 | return DoCreateChildAgentCall(regInfo, aCircuit); | 146 | return DoCreateChildAgentCall(regInfo, aCircuit); |
147 | } | ||
148 | //else | ||
149 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
145 | } | 150 | } |
146 | //else | ||
147 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
148 | return false; | 151 | return false; |
149 | } | 152 | } |
150 | 153 | ||
@@ -155,13 +158,16 @@ namespace OpenSim.Region.CoreModules.Communications.REST | |||
155 | return true; | 158 | return true; |
156 | 159 | ||
157 | // else do the remote thing | 160 | // else do the remote thing |
158 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); | 161 | if (!m_localBackend.IsLocalRegion(regionHandle)) |
159 | if (regInfo != null) | ||
160 | { | 162 | { |
161 | return DoChildAgentUpdateCall(regInfo, cAgentData); | 163 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); |
164 | if (regInfo != null) | ||
165 | { | ||
166 | return DoChildAgentUpdateCall(regInfo, cAgentData); | ||
167 | } | ||
168 | //else | ||
169 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
162 | } | 170 | } |
163 | //else | ||
164 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
165 | return false; | 171 | return false; |
166 | 172 | ||
167 | } | 173 | } |
@@ -173,13 +179,16 @@ namespace OpenSim.Region.CoreModules.Communications.REST | |||
173 | return true; | 179 | return true; |
174 | 180 | ||
175 | // else do the remote thing | 181 | // else do the remote thing |
176 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); | 182 | if (!m_localBackend.IsLocalRegion(regionHandle)) |
177 | if (regInfo != null) | ||
178 | { | 183 | { |
179 | return DoChildAgentUpdateCall(regInfo, cAgentData); | 184 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); |
185 | if (regInfo != null) | ||
186 | { | ||
187 | return DoChildAgentUpdateCall(regInfo, cAgentData); | ||
188 | } | ||
189 | //else | ||
190 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
180 | } | 191 | } |
181 | //else | ||
182 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
183 | return false; | 192 | return false; |
184 | 193 | ||
185 | } | 194 | } |
@@ -201,13 +210,16 @@ namespace OpenSim.Region.CoreModules.Communications.REST | |||
201 | return true; | 210 | return true; |
202 | 211 | ||
203 | // else do the remote thing | 212 | // else do the remote thing |
204 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); | 213 | if (!m_localBackend.IsLocalRegion(regionHandle)) |
205 | if (regInfo != null) | ||
206 | { | 214 | { |
207 | return DoCloseAgentCall(regInfo, id); | 215 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); |
216 | if (regInfo != null) | ||
217 | { | ||
218 | return DoCloseAgentCall(regInfo, id); | ||
219 | } | ||
220 | //else | ||
221 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
208 | } | 222 | } |
209 | //else | ||
210 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
211 | return false; | 223 | return false; |
212 | } | 224 | } |
213 | 225 | ||
@@ -225,13 +237,16 @@ namespace OpenSim.Region.CoreModules.Communications.REST | |||
225 | } | 237 | } |
226 | 238 | ||
227 | // else do the remote thing | 239 | // else do the remote thing |
228 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); | 240 | if (!m_localBackend.IsLocalRegion(regionHandle)) |
229 | if (regInfo != null) | ||
230 | { | 241 | { |
231 | return DoCreateObjectCall(regInfo, sog); | 242 | RegionInfo regInfo = m_commsManager.GridService.RequestNeighbourInfo(regionHandle); |
243 | if (regInfo != null) | ||
244 | { | ||
245 | return DoCreateObjectCall(regInfo, sog); | ||
246 | } | ||
247 | //else | ||
248 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
232 | } | 249 | } |
233 | //else | ||
234 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | ||
235 | return false; | 250 | return false; |
236 | } | 251 | } |
237 | 252 | ||