diff options
author | Melanie | 2009-11-26 12:16:42 +0000 |
---|---|---|
committer | Melanie | 2009-11-26 12:16:42 +0000 |
commit | 05fc504ff3698ec472c582f26a9ddfdd0ce2c8f6 (patch) | |
tree | 64312587b751e72b23eda9bc6de65b7e0f9459ff /OpenSim/Region/Framework | |
parent | Remove GetAssemblyName and friends from the SE interface. It's now handled (diff) | |
download | opensim-SC_OLD-05fc504ff3698ec472c582f26a9ddfdd0ce2c8f6.zip opensim-SC_OLD-05fc504ff3698ec472c582f26a9ddfdd0ce2c8f6.tar.gz opensim-SC_OLD-05fc504ff3698ec472c582f26a9ddfdd0ce2c8f6.tar.bz2 opensim-SC_OLD-05fc504ff3698ec472c582f26a9ddfdd0ce2c8f6.tar.xz |
Remove the old remoting-type interregion code for prim/script crossing
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 99 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 72 |
2 files changed, 0 insertions, 171 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f444e51..0ee818d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2381,103 +2381,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2381 | return successYN; | 2381 | return successYN; |
2382 | } | 2382 | } |
2383 | 2383 | ||
2384 | /// <summary> | ||
2385 | /// Handle a scene object that is crossing into this region from another. | ||
2386 | /// NOTE: Unused as of 2009-02-09. Soon to be deleted. | ||
2387 | /// </summary> | ||
2388 | /// <param name="regionHandle"></param> | ||
2389 | /// <param name="primID"></param> | ||
2390 | /// <param name="objXMLData"></param> | ||
2391 | /// <param name="XMLMethod"></param> | ||
2392 | /// <returns></returns> | ||
2393 | public bool IncomingInterRegionPrimGroup(UUID primID, string objXMLData, int XMLMethod) | ||
2394 | { | ||
2395 | if (XMLMethod == 0) | ||
2396 | { | ||
2397 | m_log.DebugFormat("[INTERREGION]: A new prim {0} arrived from a neighbor", primID); | ||
2398 | SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); | ||
2399 | if (sceneObject.IsAttachment) | ||
2400 | sceneObject.RootPart.ObjectFlags |= (uint)PrimFlags.Phantom; | ||
2401 | |||
2402 | return AddSceneObject(sceneObject); | ||
2403 | } | ||
2404 | else if ((XMLMethod == 100) && m_allowScriptCrossings) | ||
2405 | { | ||
2406 | m_log.Warn("[INTERREGION]: Prim state data arrived from a neighbor"); | ||
2407 | |||
2408 | XmlDocument doc = new XmlDocument(); | ||
2409 | doc.LoadXml(objXMLData); | ||
2410 | |||
2411 | XmlNodeList rootL = doc.GetElementsByTagName("ScriptData"); | ||
2412 | if (rootL.Count == 1) | ||
2413 | { | ||
2414 | XmlNode rootNode = rootL[0]; | ||
2415 | if (rootNode != null) | ||
2416 | { | ||
2417 | XmlNodeList partL = rootNode.ChildNodes; | ||
2418 | |||
2419 | foreach (XmlNode part in partL) | ||
2420 | { | ||
2421 | XmlNodeList nodeL = part.ChildNodes; | ||
2422 | |||
2423 | switch (part.Name) | ||
2424 | { | ||
2425 | case "Assemblies": | ||
2426 | foreach (XmlNode asm in nodeL) | ||
2427 | { | ||
2428 | string fn = asm.Attributes.GetNamedItem("Filename").Value; | ||
2429 | |||
2430 | Byte[] filedata = Convert.FromBase64String(asm.InnerText); | ||
2431 | string path = Path.Combine("ScriptEngines", RegionInfo.RegionID.ToString()); | ||
2432 | path = Path.Combine(path, fn); | ||
2433 | |||
2434 | if (!File.Exists(path)) | ||
2435 | { | ||
2436 | FileStream fs = File.Create(path); | ||
2437 | fs.Write(filedata, 0, filedata.Length); | ||
2438 | fs.Close(); | ||
2439 | } | ||
2440 | } | ||
2441 | break; | ||
2442 | case "ScriptStates": | ||
2443 | foreach (XmlNode st in nodeL) | ||
2444 | { | ||
2445 | string id = st.Attributes.GetNamedItem("UUID").Value; | ||
2446 | UUID uuid = new UUID(id); | ||
2447 | XmlNode state = st.ChildNodes[0]; | ||
2448 | |||
2449 | XmlDocument sdoc = new XmlDocument(); | ||
2450 | XmlNode sxmlnode = sdoc.CreateNode( | ||
2451 | XmlNodeType.XmlDeclaration, | ||
2452 | "", ""); | ||
2453 | sdoc.AppendChild(sxmlnode); | ||
2454 | |||
2455 | XmlNode newnode = sdoc.ImportNode(state, true); | ||
2456 | sdoc.AppendChild(newnode); | ||
2457 | |||
2458 | string spath = Path.Combine("ScriptEngines", RegionInfo.RegionID.ToString()); | ||
2459 | spath = Path.Combine(spath, uuid.ToString()); | ||
2460 | FileStream sfs = File.Create(spath + ".state"); | ||
2461 | ASCIIEncoding enc = new ASCIIEncoding(); | ||
2462 | Byte[] buf = enc.GetBytes(sdoc.InnerXml); | ||
2463 | sfs.Write(buf, 0, buf.Length); | ||
2464 | sfs.Close(); | ||
2465 | } | ||
2466 | break; | ||
2467 | } | ||
2468 | } | ||
2469 | } | ||
2470 | } | ||
2471 | |||
2472 | SceneObjectPart RootPrim = GetSceneObjectPart(primID); | ||
2473 | RootPrim.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 1); | ||
2474 | |||
2475 | return true; | ||
2476 | } | ||
2477 | |||
2478 | return true; | ||
2479 | } | ||
2480 | |||
2481 | public bool IncomingCreateObject(ISceneObject sog) | 2384 | public bool IncomingCreateObject(ISceneObject sog) |
2482 | { | 2385 | { |
2483 | //m_log.Debug(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2386 | //m_log.Debug(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); |
@@ -3350,7 +3253,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3350 | m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent; | 3253 | m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent; |
3351 | //m_eventManager.OnRegionUp += OtherRegionUp; | 3254 | //m_eventManager.OnRegionUp += OtherRegionUp; |
3352 | //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; | 3255 | //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; |
3353 | m_sceneGridService.OnExpectPrim += IncomingInterRegionPrimGroup; | ||
3354 | //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; | 3256 | //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; |
3355 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; | 3257 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; |
3356 | m_sceneGridService.KiPrimitive += SendKillObject; | 3258 | m_sceneGridService.KiPrimitive += SendKillObject; |
@@ -3374,7 +3276,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3374 | m_sceneGridService.KiPrimitive -= SendKillObject; | 3276 | m_sceneGridService.KiPrimitive -= SendKillObject; |
3375 | m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid; | 3277 | m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid; |
3376 | //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; | 3278 | //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; |
3377 | m_sceneGridService.OnExpectPrim -= IncomingInterRegionPrimGroup; | ||
3378 | //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; | 3279 | //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; |
3379 | //m_eventManager.OnRegionUp -= OtherRegionUp; | 3280 | //m_eventManager.OnRegionUp -= OtherRegionUp; |
3380 | m_sceneGridService.OnExpectUser -= HandleNewUserConnection; | 3281 | m_sceneGridService.OnExpectUser -= HandleNewUserConnection; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 76c6cab..3892769 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -85,7 +85,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
85 | /// <summary> | 85 | /// <summary> |
86 | /// A Prim will arrive shortly | 86 | /// A Prim will arrive shortly |
87 | /// </summary> | 87 | /// </summary> |
88 | public event ExpectPrimDelegate OnExpectPrim; | ||
89 | public event CloseAgentConnection OnCloseAgentConnection; | 88 | public event CloseAgentConnection OnCloseAgentConnection; |
90 | 89 | ||
91 | /// <summary> | 90 | /// <summary> |
@@ -116,7 +115,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
116 | 115 | ||
117 | private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; | 116 | private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; |
118 | private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser; | 117 | private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser; |
119 | private ExpectPrimDelegate handlerExpectPrim = null; // OnExpectPrim; | ||
120 | private CloseAgentConnection handlerCloseAgentConnection = null; // OnCloseAgentConnection; | 118 | private CloseAgentConnection handlerCloseAgentConnection = null; // OnCloseAgentConnection; |
121 | private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; | 119 | private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; |
122 | //private RegionUp handlerRegionUp = null; // OnRegionUp; | 120 | //private RegionUp handlerRegionUp = null; // OnRegionUp; |
@@ -147,30 +145,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
147 | /// <exception cref="System.Exception">Thrown if region registration fails.</exception> | 145 | /// <exception cref="System.Exception">Thrown if region registration fails.</exception> |
148 | public void RegisterRegion(IInterregionCommsOut comms_out, RegionInfo regionInfos) | 146 | public void RegisterRegion(IInterregionCommsOut comms_out, RegionInfo regionInfos) |
149 | { | 147 | { |
150 | //m_interregionCommsOut = comms_out; | ||
151 | |||
152 | //m_regionInfo = regionInfos; | ||
153 | //m_commsProvider.GridService.gdebugRegionName = regionInfos.RegionName; | ||
154 | //regionCommsHost = m_commsProvider.GridService.RegisterRegion(m_regionInfo); | ||
155 | |||
156 | //if (regionCommsHost != null) | ||
157 | //{ | ||
158 | // //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString()); | ||
159 | |||
160 | // regionCommsHost.debugRegionName = regionInfos.RegionName; | ||
161 | // regionCommsHost.OnExpectPrim += IncomingPrimCrossing; | ||
162 | // regionCommsHost.OnExpectUser += NewUserConnection; | ||
163 | // regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing; | ||
164 | // regionCommsHost.OnCloseAgentConnection += CloseConnection; | ||
165 | // regionCommsHost.OnRegionUp += newRegionUp; | ||
166 | // regionCommsHost.OnChildAgentUpdate += ChildAgentUpdate; | ||
167 | // regionCommsHost.OnLogOffUser += GridLogOffUser; | ||
168 | // regionCommsHost.OnGetLandData += FetchLandData; | ||
169 | //} | ||
170 | //else | ||
171 | //{ | ||
172 | // //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got null"); | ||
173 | //} | ||
174 | } | 148 | } |
175 | 149 | ||
176 | /// <summary> | 150 | /// <summary> |
@@ -179,31 +153,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
179 | /// </summary> | 153 | /// </summary> |
180 | public void Close() | 154 | public void Close() |
181 | { | 155 | { |
182 | |||
183 | //if (regionCommsHost != null) | ||
184 | //{ | ||
185 | // regionCommsHost.OnLogOffUser -= GridLogOffUser; | ||
186 | // regionCommsHost.OnChildAgentUpdate -= ChildAgentUpdate; | ||
187 | // regionCommsHost.OnRegionUp -= newRegionUp; | ||
188 | // regionCommsHost.OnExpectUser -= NewUserConnection; | ||
189 | // regionCommsHost.OnExpectPrim -= IncomingPrimCrossing; | ||
190 | // regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; | ||
191 | // regionCommsHost.OnCloseAgentConnection -= CloseConnection; | ||
192 | // regionCommsHost.OnGetLandData -= FetchLandData; | ||
193 | |||
194 | // try | ||
195 | // { | ||
196 | // m_commsProvider.GridService.DeregisterRegion(m_regionInfo); | ||
197 | // } | ||
198 | // catch (Exception e) | ||
199 | // { | ||
200 | // m_log.ErrorFormat( | ||
201 | // "[GRID]: Deregistration of region {0} from the grid failed - {1}. Continuing", | ||
202 | // m_regionInfo.RegionName, e); | ||
203 | // } | ||
204 | |||
205 | // regionCommsHost = null; | ||
206 | //} | ||
207 | } | 156 | } |
208 | 157 | ||
209 | #region CommsManager Event handlers | 158 | #region CommsManager Event handlers |
@@ -263,27 +212,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
263 | } | 212 | } |
264 | } | 213 | } |
265 | 214 | ||
266 | /// <summary> | ||
267 | /// We have a new prim from a neighbor | ||
268 | /// </summary> | ||
269 | /// <param name="primID">unique ID for the primative</param> | ||
270 | /// <param name="objXMLData">XML2 encoded data of the primative</param> | ||
271 | /// <param name="XMLMethod">An Int that represents the version of the XMLMethod</param> | ||
272 | /// <returns>True if the prim was accepted, false if it was not</returns> | ||
273 | protected bool IncomingPrimCrossing(UUID primID, String objXMLData, int XMLMethod) | ||
274 | { | ||
275 | handlerExpectPrim = OnExpectPrim; | ||
276 | if (handlerExpectPrim != null) | ||
277 | { | ||
278 | return handlerExpectPrim(primID, objXMLData, XMLMethod); | ||
279 | } | ||
280 | else | ||
281 | { | ||
282 | return false; | ||
283 | } | ||
284 | |||
285 | } | ||
286 | |||
287 | protected void PrimCrossing(UUID primID, Vector3 position, bool isPhysical) | 215 | protected void PrimCrossing(UUID primID, Vector3 position, bool isPhysical) |
288 | { | 216 | { |
289 | handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion; | 217 | handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion; |