diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/IRegionCommsListener.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/RegionCommsListener.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 99 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 72 |
4 files changed, 0 insertions, 198 deletions
diff --git a/OpenSim/Framework/IRegionCommsListener.cs b/OpenSim/Framework/IRegionCommsListener.cs index 307c6bc..cd59c63 100644 --- a/OpenSim/Framework/IRegionCommsListener.cs +++ b/OpenSim/Framework/IRegionCommsListener.cs | |||
@@ -32,7 +32,6 @@ namespace OpenSim.Framework | |||
32 | { | 32 | { |
33 | public delegate void ExpectUserDelegate(AgentCircuitData agent); | 33 | public delegate void ExpectUserDelegate(AgentCircuitData agent); |
34 | 34 | ||
35 | public delegate bool ExpectPrimDelegate(UUID primID, string objData, int XMLMethod); | ||
36 | 35 | ||
37 | public delegate void UpdateNeighbours(List<RegionInfo> neighbours); | 36 | public delegate void UpdateNeighbours(List<RegionInfo> neighbours); |
38 | 37 | ||
@@ -55,7 +54,6 @@ namespace OpenSim.Framework | |||
55 | public interface IRegionCommsListener | 54 | public interface IRegionCommsListener |
56 | { | 55 | { |
57 | event ExpectUserDelegate OnExpectUser; | 56 | event ExpectUserDelegate OnExpectUser; |
58 | event ExpectPrimDelegate OnExpectPrim; | ||
59 | event GenericCall2 OnExpectChildAgent; | 57 | event GenericCall2 OnExpectChildAgent; |
60 | event AgentCrossing OnAvatarCrossingIntoRegion; | 58 | event AgentCrossing OnAvatarCrossingIntoRegion; |
61 | event PrimCrossing OnPrimCrossingIntoRegion; | 59 | event PrimCrossing OnPrimCrossingIntoRegion; |
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs index 90200d6..718a556 100644 --- a/OpenSim/Framework/RegionCommsListener.cs +++ b/OpenSim/Framework/RegionCommsListener.cs | |||
@@ -43,7 +43,6 @@ namespace OpenSim.Framework | |||
43 | private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate; | 43 | private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate; |
44 | private CloseAgentConnection handlerCloseAgentConnection = null; // OnCloseAgentConnection; | 44 | private CloseAgentConnection handlerCloseAgentConnection = null; // OnCloseAgentConnection; |
45 | private GenericCall2 handlerExpectChildAgent = null; // OnExpectChildAgent; | 45 | private GenericCall2 handlerExpectChildAgent = null; // OnExpectChildAgent; |
46 | private ExpectPrimDelegate handlerExpectPrim = null; // OnExpectPrim; | ||
47 | private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser | 46 | private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser |
48 | private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate; | 47 | private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate; |
49 | private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; | 48 | private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; |
@@ -53,7 +52,6 @@ namespace OpenSim.Framework | |||
53 | #region IRegionCommsListener Members | 52 | #region IRegionCommsListener Members |
54 | 53 | ||
55 | public event ExpectUserDelegate OnExpectUser; | 54 | public event ExpectUserDelegate OnExpectUser; |
56 | public event ExpectPrimDelegate OnExpectPrim; | ||
57 | public event GenericCall2 OnExpectChildAgent; | 55 | public event GenericCall2 OnExpectChildAgent; |
58 | public event AgentCrossing OnAvatarCrossingIntoRegion; | 56 | public event AgentCrossing OnAvatarCrossingIntoRegion; |
59 | public event PrimCrossing OnPrimCrossingIntoRegion; | 57 | public event PrimCrossing OnPrimCrossingIntoRegion; |
@@ -95,17 +93,6 @@ namespace OpenSim.Framework | |||
95 | 93 | ||
96 | } | 94 | } |
97 | 95 | ||
98 | public virtual bool TriggerExpectPrim(UUID primID, string objData, int XMLMethod) | ||
99 | { | ||
100 | handlerExpectPrim = OnExpectPrim; | ||
101 | if (handlerExpectPrim != null) | ||
102 | { | ||
103 | handlerExpectPrim(primID, objData, XMLMethod); | ||
104 | return true; | ||
105 | } | ||
106 | return false; | ||
107 | } | ||
108 | |||
109 | public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData) | 96 | public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData) |
110 | { | 97 | { |
111 | handlerChildAgentUpdate = OnChildAgentUpdate; | 98 | handlerChildAgentUpdate = OnChildAgentUpdate; |
@@ -128,18 +115,6 @@ namespace OpenSim.Framework | |||
128 | return false; | 115 | return false; |
129 | } | 116 | } |
130 | 117 | ||
131 | public virtual bool TriggerExpectPrimCrossing(UUID primID, Vector3 position, | ||
132 | bool isPhysical) | ||
133 | { | ||
134 | handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion; | ||
135 | if (handlerPrimCrossingIntoRegion != null) | ||
136 | { | ||
137 | handlerPrimCrossingIntoRegion(primID, position, isPhysical); | ||
138 | return true; | ||
139 | } | ||
140 | return false; | ||
141 | } | ||
142 | |||
143 | public virtual bool TriggerAcknowledgeAgentCrossed(UUID agentID) | 118 | public virtual bool TriggerAcknowledgeAgentCrossed(UUID agentID) |
144 | { | 119 | { |
145 | handlerAcknowledgeAgentCrossed = OnAcknowledgeAgentCrossed; | 120 | handlerAcknowledgeAgentCrossed = OnAcknowledgeAgentCrossed; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index be1d4bf..f932659 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2393,103 +2393,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2393 | return successYN; | 2393 | return successYN; |
2394 | } | 2394 | } |
2395 | 2395 | ||
2396 | /// <summary> | ||
2397 | /// Handle a scene object that is crossing into this region from another. | ||
2398 | /// NOTE: Unused as of 2009-02-09. Soon to be deleted. | ||
2399 | /// </summary> | ||
2400 | /// <param name="regionHandle"></param> | ||
2401 | /// <param name="primID"></param> | ||
2402 | /// <param name="objXMLData"></param> | ||
2403 | /// <param name="XMLMethod"></param> | ||
2404 | /// <returns></returns> | ||
2405 | public bool IncomingInterRegionPrimGroup(UUID primID, string objXMLData, int XMLMethod) | ||
2406 | { | ||
2407 | if (XMLMethod == 0) | ||
2408 | { | ||
2409 | m_log.DebugFormat("[INTERREGION]: A new prim {0} arrived from a neighbor", primID); | ||
2410 | SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); | ||
2411 | if (sceneObject.IsAttachment) | ||
2412 | sceneObject.RootPart.ObjectFlags |= (uint)PrimFlags.Phantom; | ||
2413 | |||
2414 | return AddSceneObject(sceneObject); | ||
2415 | } | ||
2416 | else if ((XMLMethod == 100) && m_allowScriptCrossings) | ||
2417 | { | ||
2418 | m_log.Warn("[INTERREGION]: Prim state data arrived from a neighbor"); | ||
2419 | |||
2420 | XmlDocument doc = new XmlDocument(); | ||
2421 | doc.LoadXml(objXMLData); | ||
2422 | |||
2423 | XmlNodeList rootL = doc.GetElementsByTagName("ScriptData"); | ||
2424 | if (rootL.Count == 1) | ||
2425 | { | ||
2426 | XmlNode rootNode = rootL[0]; | ||
2427 | if (rootNode != null) | ||
2428 | { | ||
2429 | XmlNodeList partL = rootNode.ChildNodes; | ||
2430 | |||
2431 | foreach (XmlNode part in partL) | ||
2432 | { | ||
2433 | XmlNodeList nodeL = part.ChildNodes; | ||
2434 | |||
2435 | switch (part.Name) | ||
2436 | { | ||
2437 | case "Assemblies": | ||
2438 | foreach (XmlNode asm in nodeL) | ||
2439 | { | ||
2440 | string fn = asm.Attributes.GetNamedItem("Filename").Value; | ||
2441 | |||
2442 | Byte[] filedata = Convert.FromBase64String(asm.InnerText); | ||
2443 | string path = Path.Combine("ScriptEngines", RegionInfo.RegionID.ToString()); | ||
2444 | path = Path.Combine(path, fn); | ||
2445 | |||
2446 | if (!File.Exists(path)) | ||
2447 | { | ||
2448 | FileStream fs = File.Create(path); | ||
2449 | fs.Write(filedata, 0, filedata.Length); | ||
2450 | fs.Close(); | ||
2451 | } | ||
2452 | } | ||
2453 | break; | ||
2454 | case "ScriptStates": | ||
2455 | foreach (XmlNode st in nodeL) | ||
2456 | { | ||
2457 | string id = st.Attributes.GetNamedItem("UUID").Value; | ||
2458 | UUID uuid = new UUID(id); | ||
2459 | XmlNode state = st.ChildNodes[0]; | ||
2460 | |||
2461 | XmlDocument sdoc = new XmlDocument(); | ||
2462 | XmlNode sxmlnode = sdoc.CreateNode( | ||
2463 | XmlNodeType.XmlDeclaration, | ||
2464 | "", ""); | ||
2465 | sdoc.AppendChild(sxmlnode); | ||
2466 | |||
2467 | XmlNode newnode = sdoc.ImportNode(state, true); | ||
2468 | sdoc.AppendChild(newnode); | ||
2469 | |||
2470 | string spath = Path.Combine("ScriptEngines", RegionInfo.RegionID.ToString()); | ||
2471 | spath = Path.Combine(spath, uuid.ToString()); | ||
2472 | FileStream sfs = File.Create(spath + ".state"); | ||
2473 | ASCIIEncoding enc = new ASCIIEncoding(); | ||
2474 | Byte[] buf = enc.GetBytes(sdoc.InnerXml); | ||
2475 | sfs.Write(buf, 0, buf.Length); | ||
2476 | sfs.Close(); | ||
2477 | } | ||
2478 | break; | ||
2479 | } | ||
2480 | } | ||
2481 | } | ||
2482 | } | ||
2483 | |||
2484 | SceneObjectPart RootPrim = GetSceneObjectPart(primID); | ||
2485 | RootPrim.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 1); | ||
2486 | |||
2487 | return true; | ||
2488 | } | ||
2489 | |||
2490 | return true; | ||
2491 | } | ||
2492 | |||
2493 | public bool IncomingCreateObject(ISceneObject sog) | 2396 | public bool IncomingCreateObject(ISceneObject sog) |
2494 | { | 2397 | { |
2495 | //m_log.Debug(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2398 | //m_log.Debug(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); |
@@ -3362,7 +3265,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3362 | m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent; | 3265 | m_sceneGridService.OnCloseAgentConnection += IncomingCloseAgent; |
3363 | //m_eventManager.OnRegionUp += OtherRegionUp; | 3266 | //m_eventManager.OnRegionUp += OtherRegionUp; |
3364 | //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; | 3267 | //m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; |
3365 | m_sceneGridService.OnExpectPrim += IncomingInterRegionPrimGroup; | ||
3366 | //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; | 3268 | //m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; |
3367 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; | 3269 | m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; |
3368 | m_sceneGridService.KiPrimitive += SendKillObject; | 3270 | m_sceneGridService.KiPrimitive += SendKillObject; |
@@ -3386,7 +3288,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3386 | m_sceneGridService.KiPrimitive -= SendKillObject; | 3288 | m_sceneGridService.KiPrimitive -= SendKillObject; |
3387 | m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid; | 3289 | m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid; |
3388 | //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; | 3290 | //m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; |
3389 | m_sceneGridService.OnExpectPrim -= IncomingInterRegionPrimGroup; | ||
3390 | //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; | 3291 | //m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; |
3391 | //m_eventManager.OnRegionUp -= OtherRegionUp; | 3292 | //m_eventManager.OnRegionUp -= OtherRegionUp; |
3392 | m_sceneGridService.OnExpectUser -= HandleNewUserConnection; | 3293 | 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; |