diff options
author | Jonathan Freedman | 2010-08-29 21:28:31 -0400 |
---|---|---|
committer | Melanie | 2010-08-30 02:07:55 +0100 |
commit | 0a83fde85c8cffa1da46ef0a17390399ae74fa61 (patch) | |
tree | 5e1b8b09f17b214f050c102c750d962a4f4b3ffa /OpenSim/Region/CoreModules/Framework | |
parent | Replace hardcoded 0 with KickFlags provided by the client. (diff) | |
download | opensim-SC-0a83fde85c8cffa1da46ef0a17390399ae74fa61.zip opensim-SC-0a83fde85c8cffa1da46ef0a17390399ae74fa61.tar.gz opensim-SC-0a83fde85c8cffa1da46ef0a17390399ae74fa61.tar.bz2 opensim-SC-0a83fde85c8cffa1da46ef0a17390399ae74fa61.tar.xz |
Implements parcel media setting persistence and packet / CAPS handling
properly for the new media settings.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | 120 |
2 files changed, 20 insertions, 118 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs index 0c6cb1b..35b70de 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs | |||
@@ -34,6 +34,7 @@ using System.Threading; | |||
34 | using log4net; | 34 | using log4net; |
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using OpenMetaverse; | 36 | using OpenMetaverse; |
37 | using OpenMetaverse.Messages.Linden; | ||
37 | using OpenMetaverse.Packets; | 38 | using OpenMetaverse.Packets; |
38 | using OpenMetaverse.StructuredData; | 39 | using OpenMetaverse.StructuredData; |
39 | using OpenSim.Framework; | 40 | using OpenSim.Framework; |
@@ -137,10 +138,11 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
137 | { | 138 | { |
138 | if (!queues.ContainsKey(agentId)) | 139 | if (!queues.ContainsKey(agentId)) |
139 | { | 140 | { |
141 | /* | ||
140 | m_log.DebugFormat( | 142 | m_log.DebugFormat( |
141 | "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", | 143 | "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", |
142 | agentId, m_scene.RegionInfo.RegionName); | 144 | agentId, m_scene.RegionInfo.RegionName); |
143 | 145 | */ | |
144 | queues[agentId] = new Queue<OSD>(); | 146 | queues[agentId] = new Queue<OSD>(); |
145 | } | 147 | } |
146 | 148 | ||
@@ -200,7 +202,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
200 | 202 | ||
201 | private void ClientClosed(UUID AgentID, Scene scene) | 203 | private void ClientClosed(UUID AgentID, Scene scene) |
202 | { | 204 | { |
203 | m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName); | 205 | //m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName); |
204 | 206 | ||
205 | int count = 0; | 207 | int count = 0; |
206 | while (queues.ContainsKey(AgentID) && queues[AgentID].Count > 0 && count++ < 5) | 208 | while (queues.ContainsKey(AgentID) && queues[AgentID].Count > 0 && count++ < 5) |
@@ -284,7 +286,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
284 | // Reuse open queues. The client does! | 286 | // Reuse open queues. The client does! |
285 | if (m_AvatarQueueUUIDMapping.ContainsKey(agentID)) | 287 | if (m_AvatarQueueUUIDMapping.ContainsKey(agentID)) |
286 | { | 288 | { |
287 | m_log.DebugFormat("[EVENTQUEUE]: Found Existing UUID!"); | 289 | //m_log.DebugFormat("[EVENTQUEUE]: Found Existing UUID!"); |
288 | EventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID]; | 290 | EventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID]; |
289 | } | 291 | } |
290 | else | 292 | else |
@@ -365,7 +367,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
365 | { | 367 | { |
366 | // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say! | 368 | // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say! |
367 | array.Add(EventQueueHelper.KeepAliveEvent()); | 369 | array.Add(EventQueueHelper.KeepAliveEvent()); |
368 | m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", pAgentId, m_scene.RegionInfo.RegionName); | 370 | //m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", pAgentId, m_scene.RegionInfo.RegionName); |
369 | } | 371 | } |
370 | else | 372 | else |
371 | { | 373 | { |
@@ -394,8 +396,8 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
394 | responsedata["keepalive"] = false; | 396 | responsedata["keepalive"] = false; |
395 | responsedata["reusecontext"] = false; | 397 | responsedata["reusecontext"] = false; |
396 | responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events); | 398 | responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events); |
399 | //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", pAgentId, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); | ||
397 | return responsedata; | 400 | return responsedata; |
398 | //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); | ||
399 | } | 401 | } |
400 | 402 | ||
401 | public Hashtable NoEvents(UUID requestID, UUID agentID) | 403 | public Hashtable NoEvents(UUID requestID, UUID agentID) |
@@ -461,7 +463,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
461 | { | 463 | { |
462 | // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say! | 464 | // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say! |
463 | array.Add(EventQueueHelper.KeepAliveEvent()); | 465 | array.Add(EventQueueHelper.KeepAliveEvent()); |
464 | m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName); | 466 | //m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName); |
465 | } | 467 | } |
466 | else | 468 | else |
467 | { | 469 | { |
@@ -697,9 +699,9 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
697 | //m_log.InfoFormat("########### eq ChatterBoxSessionAgentListUpdates #############\n{0}", item); | 699 | //m_log.InfoFormat("########### eq ChatterBoxSessionAgentListUpdates #############\n{0}", item); |
698 | } | 700 | } |
699 | 701 | ||
700 | public void ParcelProperties(ParcelPropertiesPacket parcelPropertiesPacket, UUID avatarID) | 702 | public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID) |
701 | { | 703 | { |
702 | OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesPacket); | 704 | OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage); |
703 | Enqueue(item, avatarID); | 705 | Enqueue(item, avatarID); |
704 | } | 706 | } |
705 | 707 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index e9bcae3..6294935 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | |||
@@ -30,6 +30,7 @@ using System.Net; | |||
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using OpenMetaverse.Packets; | 31 | using OpenMetaverse.Packets; |
32 | using OpenMetaverse.StructuredData; | 32 | using OpenMetaverse.StructuredData; |
33 | using OpenMetaverse.Messages.Linden; | ||
33 | 34 | ||
34 | namespace OpenSim.Region.CoreModules.Framework.EventQueue | 35 | namespace OpenSim.Region.CoreModules.Framework.EventQueue |
35 | { | 36 | { |
@@ -309,116 +310,6 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
309 | return chatterBoxSessionAgentListUpdates; | 310 | return chatterBoxSessionAgentListUpdates; |
310 | } | 311 | } |
311 | 312 | ||
312 | public static OSD ParcelProperties(ParcelPropertiesPacket parcelPropertiesPacket) | ||
313 | { | ||
314 | OSDMap parcelProperties = new OSDMap(); | ||
315 | OSDMap body = new OSDMap(); | ||
316 | |||
317 | OSDArray ageVerificationBlock = new OSDArray(); | ||
318 | OSDMap ageVerificationMap = new OSDMap(); | ||
319 | ageVerificationMap.Add("RegionDenyAgeUnverified", | ||
320 | OSD.FromBoolean(parcelPropertiesPacket.AgeVerificationBlock.RegionDenyAgeUnverified)); | ||
321 | ageVerificationBlock.Add(ageVerificationMap); | ||
322 | body.Add("AgeVerificationBlock", ageVerificationBlock); | ||
323 | |||
324 | // LL sims send media info in this event queue message but it's not in the UDP | ||
325 | // packet we construct this event queue message from. This should be refactored in | ||
326 | // other areas of the code so it can all be send in the same message. Until then we will | ||
327 | // still send the media info via UDP | ||
328 | |||
329 | //OSDArray mediaData = new OSDArray(); | ||
330 | //OSDMap mediaDataMap = new OSDMap(); | ||
331 | //mediaDataMap.Add("MediaDesc", OSD.FromString("")); | ||
332 | //mediaDataMap.Add("MediaHeight", OSD.FromInteger(0)); | ||
333 | //mediaDataMap.Add("MediaLoop", OSD.FromInteger(0)); | ||
334 | //mediaDataMap.Add("MediaType", OSD.FromString("type/type")); | ||
335 | //mediaDataMap.Add("MediaWidth", OSD.FromInteger(0)); | ||
336 | //mediaDataMap.Add("ObscureMedia", OSD.FromInteger(0)); | ||
337 | //mediaDataMap.Add("ObscureMusic", OSD.FromInteger(0)); | ||
338 | //mediaData.Add(mediaDataMap); | ||
339 | //body.Add("MediaData", mediaData); | ||
340 | |||
341 | OSDArray parcelData = new OSDArray(); | ||
342 | OSDMap parcelDataMap = new OSDMap(); | ||
343 | OSDArray AABBMax = new OSDArray(3); | ||
344 | AABBMax.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMax.X)); | ||
345 | AABBMax.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMax.Y)); | ||
346 | AABBMax.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMax.Z)); | ||
347 | parcelDataMap.Add("AABBMax", AABBMax); | ||
348 | |||
349 | OSDArray AABBMin = new OSDArray(3); | ||
350 | AABBMin.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMin.X)); | ||
351 | AABBMin.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMin.Y)); | ||
352 | AABBMin.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMin.Z)); | ||
353 | parcelDataMap.Add("AABBMin", AABBMin); | ||
354 | |||
355 | parcelDataMap.Add("Area", OSD.FromInteger(parcelPropertiesPacket.ParcelData.Area)); | ||
356 | parcelDataMap.Add("AuctionID", OSD.FromBinary(uintToByteArray(parcelPropertiesPacket.ParcelData.AuctionID))); | ||
357 | parcelDataMap.Add("AuthBuyerID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.AuthBuyerID)); | ||
358 | parcelDataMap.Add("Bitmap", OSD.FromBinary(parcelPropertiesPacket.ParcelData.Bitmap)); | ||
359 | parcelDataMap.Add("Category", OSD.FromInteger((int)parcelPropertiesPacket.ParcelData.Category)); | ||
360 | parcelDataMap.Add("ClaimDate", OSD.FromInteger(parcelPropertiesPacket.ParcelData.ClaimDate)); | ||
361 | parcelDataMap.Add("ClaimPrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.ClaimPrice)); | ||
362 | parcelDataMap.Add("Desc", OSD.FromString(Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc))); | ||
363 | parcelDataMap.Add("GroupID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.GroupID)); | ||
364 | parcelDataMap.Add("GroupPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.GroupPrims)); | ||
365 | parcelDataMap.Add("IsGroupOwned", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.IsGroupOwned)); | ||
366 | parcelDataMap.Add("LandingType", OSD.FromInteger(parcelPropertiesPacket.ParcelData.LandingType)); | ||
367 | parcelDataMap.Add("LocalID", OSD.FromInteger(parcelPropertiesPacket.ParcelData.LocalID)); | ||
368 | parcelDataMap.Add("MaxPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.MaxPrims)); | ||
369 | parcelDataMap.Add("MediaAutoScale", OSD.FromInteger((int)parcelPropertiesPacket.ParcelData.MediaAutoScale)); | ||
370 | parcelDataMap.Add("MediaID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.MediaID)); | ||
371 | parcelDataMap.Add("MediaURL", OSD.FromString(Utils.BytesToString(parcelPropertiesPacket.ParcelData.MediaURL))); | ||
372 | parcelDataMap.Add("MusicURL", OSD.FromString(Utils.BytesToString(parcelPropertiesPacket.ParcelData.MusicURL))); | ||
373 | parcelDataMap.Add("Name", OSD.FromString(Utils.BytesToString(parcelPropertiesPacket.ParcelData.Name))); | ||
374 | parcelDataMap.Add("OtherCleanTime", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OtherCleanTime)); | ||
375 | parcelDataMap.Add("OtherCount", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OtherCount)); | ||
376 | parcelDataMap.Add("OtherPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OtherPrims)); | ||
377 | parcelDataMap.Add("OwnerID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.OwnerID)); | ||
378 | parcelDataMap.Add("OwnerPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OwnerPrims)); | ||
379 | parcelDataMap.Add("ParcelFlags", OSD.FromBinary(uintToByteArray(parcelPropertiesPacket.ParcelData.ParcelFlags))); | ||
380 | parcelDataMap.Add("ParcelPrimBonus", OSD.FromReal(parcelPropertiesPacket.ParcelData.ParcelPrimBonus)); | ||
381 | parcelDataMap.Add("PassHours", OSD.FromReal(parcelPropertiesPacket.ParcelData.PassHours)); | ||
382 | parcelDataMap.Add("PassPrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.PassPrice)); | ||
383 | parcelDataMap.Add("PublicCount", OSD.FromInteger(parcelPropertiesPacket.ParcelData.PublicCount)); | ||
384 | parcelDataMap.Add("RegionDenyAnonymous", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.RegionDenyAnonymous)); | ||
385 | parcelDataMap.Add("RegionDenyIdentified", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.RegionDenyIdentified)); | ||
386 | parcelDataMap.Add("RegionDenyTransacted", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.RegionDenyTransacted)); | ||
387 | |||
388 | parcelDataMap.Add("RegionPushOverride", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.RegionPushOverride)); | ||
389 | parcelDataMap.Add("RentPrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.RentPrice)); | ||
390 | parcelDataMap.Add("RequestResult", OSD.FromInteger(parcelPropertiesPacket.ParcelData.RequestResult)); | ||
391 | parcelDataMap.Add("SalePrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SalePrice)); | ||
392 | parcelDataMap.Add("SelectedPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SelectedPrims)); | ||
393 | parcelDataMap.Add("SelfCount", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SelfCount)); | ||
394 | parcelDataMap.Add("SequenceID", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SequenceID)); | ||
395 | parcelDataMap.Add("SimWideMaxPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SimWideMaxPrims)); | ||
396 | parcelDataMap.Add("SimWideTotalPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SimWideTotalPrims)); | ||
397 | parcelDataMap.Add("SnapSelection", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.SnapSelection)); | ||
398 | parcelDataMap.Add("SnapshotID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.SnapshotID)); | ||
399 | parcelDataMap.Add("Status", OSD.FromInteger((int)parcelPropertiesPacket.ParcelData.Status)); | ||
400 | parcelDataMap.Add("TotalPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.TotalPrims)); | ||
401 | |||
402 | OSDArray UserLocation = new OSDArray(3); | ||
403 | UserLocation.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLocation.X)); | ||
404 | UserLocation.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLocation.Y)); | ||
405 | UserLocation.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLocation.Z)); | ||
406 | parcelDataMap.Add("UserLocation", UserLocation); | ||
407 | |||
408 | OSDArray UserLookAt = new OSDArray(3); | ||
409 | UserLookAt.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLookAt.X)); | ||
410 | UserLookAt.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLookAt.Y)); | ||
411 | UserLookAt.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLookAt.Z)); | ||
412 | parcelDataMap.Add("UserLookAt", UserLookAt); | ||
413 | |||
414 | parcelData.Add(parcelDataMap); | ||
415 | body.Add("ParcelData", parcelData); | ||
416 | parcelProperties.Add("body", body); | ||
417 | parcelProperties.Add("message", OSD.FromString("ParcelProperties")); | ||
418 | |||
419 | return parcelProperties; | ||
420 | } | ||
421 | |||
422 | public static OSD GroupMembership(AgentGroupDataUpdatePacket groupUpdatePacket) | 313 | public static OSD GroupMembership(AgentGroupDataUpdatePacket groupUpdatePacket) |
423 | { | 314 | { |
424 | OSDMap groupUpdate = new OSDMap(); | 315 | OSDMap groupUpdate = new OSDMap(); |
@@ -495,5 +386,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
495 | return placesReply; | 386 | return placesReply; |
496 | } | 387 | } |
497 | 388 | ||
389 | public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage) | ||
390 | { | ||
391 | OSDMap message = new OSDMap(); | ||
392 | message.Add("message", OSD.FromString("ParcelProperties")); | ||
393 | OSD message_body = parcelPropertiesMessage.Serialize(); | ||
394 | message.Add("body", message_body); | ||
395 | return message; | ||
396 | } | ||
397 | |||
498 | } | 398 | } |
499 | } | 399 | } |