diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps')
4 files changed, 41 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs index b3b0b8a..9e24bce 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests | |||
96 | UUID spId = TestHelpers.ParseTail(0x1); | 96 | UUID spId = TestHelpers.ParseTail(0x1); |
97 | 97 | ||
98 | SceneHelpers.AddScenePresence(m_scene, spId); | 98 | SceneHelpers.AddScenePresence(m_scene, spId); |
99 | m_scene.IncomingCloseAgent(spId, false); | 99 | m_scene.CloseAgent(spId, false); |
100 | 100 | ||
101 | // TODO: Add more assertions for the other aspects of event queues | 101 | // TODO: Add more assertions for the other aspects of event queues |
102 | Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(0)); | 102 | Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(0)); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs index 92805e2..94f8bc1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs | |||
@@ -155,6 +155,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
155 | Quaternion rotation = Quaternion.Identity; | 155 | Quaternion rotation = Quaternion.Identity; |
156 | Vector3 scale = Vector3.Zero; | 156 | Vector3 scale = Vector3.Zero; |
157 | int state = 0; | 157 | int state = 0; |
158 | int lastattach = 0; | ||
158 | 159 | ||
159 | if (r.Type != OSDType.Map) // not a proper req | 160 | if (r.Type != OSDType.Map) // not a proper req |
160 | return responsedata; | 161 | return responsedata; |
@@ -224,6 +225,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
224 | 225 | ||
225 | ray_target_id = ObjMap["RayTargetId"].AsUUID(); | 226 | ray_target_id = ObjMap["RayTargetId"].AsUUID(); |
226 | state = ObjMap["State"].AsInteger(); | 227 | state = ObjMap["State"].AsInteger(); |
228 | lastattach = ObjMap["LastAttachPoint"].AsInteger(); | ||
227 | try | 229 | try |
228 | { | 230 | { |
229 | ray_end = ((OSDArray)ObjMap["RayEnd"]).AsVector3(); | 231 | ray_end = ((OSDArray)ObjMap["RayEnd"]).AsVector3(); |
@@ -290,6 +292,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
290 | 292 | ||
291 | //session_id = rm["session_id"].AsUUID(); | 293 | //session_id = rm["session_id"].AsUUID(); |
292 | state = rm["state"].AsInteger(); | 294 | state = rm["state"].AsInteger(); |
295 | lastattach = rm["last_attach_point"].AsInteger(); | ||
293 | try | 296 | try |
294 | { | 297 | { |
295 | ray_end = ((OSDArray)rm["ray_end"]).AsVector3(); | 298 | ray_end = ((OSDArray)rm["ray_end"]).AsVector3(); |
@@ -331,6 +334,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
331 | pbs.ProfileEnd = (ushort)profile_end; | 334 | pbs.ProfileEnd = (ushort)profile_end; |
332 | pbs.Scale = scale; | 335 | pbs.Scale = scale; |
333 | pbs.State = (byte)state; | 336 | pbs.State = (byte)state; |
337 | pbs.LastAttachPoint = (byte)lastattach; | ||
334 | 338 | ||
335 | SceneObjectGroup obj = null; ; | 339 | SceneObjectGroup obj = null; ; |
336 | 340 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index 55a503e..769fe28 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | |||
@@ -277,6 +277,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
277 | pbs.ProfileEnd = (ushort) obj.ProfileEnd; | 277 | pbs.ProfileEnd = (ushort) obj.ProfileEnd; |
278 | pbs.Scale = obj.Scale; | 278 | pbs.Scale = obj.Scale; |
279 | pbs.State = (byte) 0; | 279 | pbs.State = (byte) 0; |
280 | pbs.LastAttachPoint = (byte) 0; | ||
280 | SceneObjectPart prim = new SceneObjectPart(); | 281 | SceneObjectPart prim = new SceneObjectPart(); |
281 | prim.UUID = UUID.Random(); | 282 | prim.UUID = UUID.Random(); |
282 | prim.CreatorID = AgentId; | 283 | prim.CreatorID = AgentId; |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index f816ad3..6fc35cd 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -116,7 +116,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
116 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; | 116 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; |
117 | 117 | ||
118 | foreach (Thread t in m_workerThreads) | 118 | foreach (Thread t in m_workerThreads) |
119 | Watchdog.AbortThread(t.ManagedThreadId); | 119 | Watchdog.AbortThread(t.ManagedThreadId); |
120 | 120 | ||
121 | m_scene = null; | 121 | m_scene = null; |
122 | } | 122 | } |
@@ -298,36 +298,49 @@ namespace OpenSim.Region.ClientStack.Linden | |||
298 | requestinfo.request["body"].ToString(), String.Empty, String.Empty, null, null); | 298 | requestinfo.request["body"].ToString(), String.Empty, String.Empty, null, null); |
299 | 299 | ||
300 | lock (responses) | 300 | lock (responses) |
301 | responses[requestID] = response; | 301 | responses[requestID] = response; |
302 | } | 302 | } |
303 | } | 303 | } |
304 | 304 | ||
305 | private void RegisterCaps(UUID agentID, Caps caps) | 305 | private void RegisterCaps(UUID agentID, Caps caps) |
306 | { | 306 | { |
307 | if (m_fetchInventoryDescendents2Url == "") | 307 | RegisterFetchDescendentsCap(agentID, caps, "FetchInventoryDescendents2", m_fetchInventoryDescendents2Url); |
308 | } | ||
309 | |||
310 | private void RegisterFetchDescendentsCap(UUID agentID, Caps caps, string capName, string url) | ||
311 | { | ||
312 | string capUrl; | ||
313 | |||
314 | // disable the cap clause | ||
315 | if (url == "") | ||
316 | { | ||
308 | return; | 317 | return; |
318 | } | ||
319 | // handled by the simulator | ||
320 | else if (url == "localhost") | ||
321 | { | ||
322 | capUrl = "/CAPS/" + UUID.Random() + "/"; | ||
309 | 323 | ||
310 | // Register this as a poll service | 324 | // Register this as a poll service |
311 | PollServiceInventoryEventArgs args | 325 | PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(m_scene, capUrl, agentID); |
312 | = new PollServiceInventoryEventArgs(m_scene, "/CAPS/" + UUID.Random() + "/", agentID); | 326 | args.Type = PollServiceEventArgs.EventType.Inventory; |
313 | args.Type = PollServiceEventArgs.EventType.Inventory; | ||
314 | 327 | ||
315 | caps.RegisterPollHandler("FetchInventoryDescendents2", args); | 328 | caps.RegisterPollHandler(capName, args); |
329 | } | ||
330 | // external handler | ||
331 | else | ||
332 | { | ||
333 | capUrl = url; | ||
334 | IExternalCapsModule handler = m_scene.RequestModuleInterface<IExternalCapsModule>(); | ||
335 | if (handler != null) | ||
336 | handler.RegisterExternalUserCapsHandler(agentID,caps,capName,capUrl); | ||
337 | else | ||
338 | caps.RegisterHandler(capName, capUrl); | ||
339 | } | ||
316 | 340 | ||
317 | // MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); | 341 | // m_log.DebugFormat( |
318 | // | 342 | // "[FETCH INVENTORY DESCENDENTS2 MODULE]: Registered capability {0} at {1} in region {2} for {3}", |
319 | // string hostName = m_scene.RegionInfo.ExternalHostName; | 343 | // capName, capUrl, m_scene.RegionInfo.RegionName, agentID); |
320 | // uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; | ||
321 | // string protocol = "http"; | ||
322 | // | ||
323 | // if (MainServer.Instance.UseSSL) | ||
324 | // { | ||
325 | // hostName = MainServer.Instance.SSLCommonName; | ||
326 | // port = MainServer.Instance.SSLPort; | ||
327 | // protocol = "https"; | ||
328 | // } | ||
329 | // | ||
330 | // caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); | ||
331 | } | 344 | } |
332 | 345 | ||
333 | // private void DeregisterCaps(UUID agentID, Caps caps) | 346 | // private void DeregisterCaps(UUID agentID, Caps caps) |