mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Implements parcel media setting persistence and packet / CAPS handling
properly for the new media settings. Signed-off-by: Melanie <melanie@t-data.com>
This commit is contained in:
committed by
Melanie
parent
374807d194
commit
0a83fde85c
@@ -34,6 +34,7 @@ using System.Threading;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Messages.Linden;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using OpenSim.Framework;
|
||||
@@ -137,10 +138,11 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
{
|
||||
if (!queues.ContainsKey(agentId))
|
||||
{
|
||||
/*
|
||||
m_log.DebugFormat(
|
||||
"[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
|
||||
agentId, m_scene.RegionInfo.RegionName);
|
||||
|
||||
*/
|
||||
queues[agentId] = new Queue<OSD>();
|
||||
}
|
||||
|
||||
@@ -200,7 +202,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
|
||||
private void ClientClosed(UUID AgentID, Scene scene)
|
||||
{
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
|
||||
|
||||
int count = 0;
|
||||
while (queues.ContainsKey(AgentID) && queues[AgentID].Count > 0 && count++ < 5)
|
||||
@@ -284,7 +286,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
// Reuse open queues. The client does!
|
||||
if (m_AvatarQueueUUIDMapping.ContainsKey(agentID))
|
||||
{
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Found Existing UUID!");
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: Found Existing UUID!");
|
||||
EventQueueGetUUID = m_AvatarQueueUUIDMapping[agentID];
|
||||
}
|
||||
else
|
||||
@@ -365,7 +367,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
{
|
||||
// Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
|
||||
array.Add(EventQueueHelper.KeepAliveEvent());
|
||||
m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", pAgentId, m_scene.RegionInfo.RegionName);
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", pAgentId, m_scene.RegionInfo.RegionName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -394,8 +396,8 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["reusecontext"] = false;
|
||||
responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", pAgentId, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||
return responsedata;
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||
}
|
||||
|
||||
public Hashtable NoEvents(UUID requestID, UUID agentID)
|
||||
@@ -461,7 +463,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
{
|
||||
// Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
|
||||
array.Add(EventQueueHelper.KeepAliveEvent());
|
||||
m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName);
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -697,9 +699,9 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
//m_log.InfoFormat("########### eq ChatterBoxSessionAgentListUpdates #############\n{0}", item);
|
||||
}
|
||||
|
||||
public void ParcelProperties(ParcelPropertiesPacket parcelPropertiesPacket, UUID avatarID)
|
||||
public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID)
|
||||
{
|
||||
OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesPacket);
|
||||
OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage);
|
||||
Enqueue(item, avatarID);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ using System.Net;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using OpenMetaverse.Messages.Linden;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
{
|
||||
@@ -309,116 +310,6 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
return chatterBoxSessionAgentListUpdates;
|
||||
}
|
||||
|
||||
public static OSD ParcelProperties(ParcelPropertiesPacket parcelPropertiesPacket)
|
||||
{
|
||||
OSDMap parcelProperties = new OSDMap();
|
||||
OSDMap body = new OSDMap();
|
||||
|
||||
OSDArray ageVerificationBlock = new OSDArray();
|
||||
OSDMap ageVerificationMap = new OSDMap();
|
||||
ageVerificationMap.Add("RegionDenyAgeUnverified",
|
||||
OSD.FromBoolean(parcelPropertiesPacket.AgeVerificationBlock.RegionDenyAgeUnverified));
|
||||
ageVerificationBlock.Add(ageVerificationMap);
|
||||
body.Add("AgeVerificationBlock", ageVerificationBlock);
|
||||
|
||||
// LL sims send media info in this event queue message but it's not in the UDP
|
||||
// packet we construct this event queue message from. This should be refactored in
|
||||
// other areas of the code so it can all be send in the same message. Until then we will
|
||||
// still send the media info via UDP
|
||||
|
||||
//OSDArray mediaData = new OSDArray();
|
||||
//OSDMap mediaDataMap = new OSDMap();
|
||||
//mediaDataMap.Add("MediaDesc", OSD.FromString(""));
|
||||
//mediaDataMap.Add("MediaHeight", OSD.FromInteger(0));
|
||||
//mediaDataMap.Add("MediaLoop", OSD.FromInteger(0));
|
||||
//mediaDataMap.Add("MediaType", OSD.FromString("type/type"));
|
||||
//mediaDataMap.Add("MediaWidth", OSD.FromInteger(0));
|
||||
//mediaDataMap.Add("ObscureMedia", OSD.FromInteger(0));
|
||||
//mediaDataMap.Add("ObscureMusic", OSD.FromInteger(0));
|
||||
//mediaData.Add(mediaDataMap);
|
||||
//body.Add("MediaData", mediaData);
|
||||
|
||||
OSDArray parcelData = new OSDArray();
|
||||
OSDMap parcelDataMap = new OSDMap();
|
||||
OSDArray AABBMax = new OSDArray(3);
|
||||
AABBMax.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMax.X));
|
||||
AABBMax.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMax.Y));
|
||||
AABBMax.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMax.Z));
|
||||
parcelDataMap.Add("AABBMax", AABBMax);
|
||||
|
||||
OSDArray AABBMin = new OSDArray(3);
|
||||
AABBMin.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMin.X));
|
||||
AABBMin.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMin.Y));
|
||||
AABBMin.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.AABBMin.Z));
|
||||
parcelDataMap.Add("AABBMin", AABBMin);
|
||||
|
||||
parcelDataMap.Add("Area", OSD.FromInteger(parcelPropertiesPacket.ParcelData.Area));
|
||||
parcelDataMap.Add("AuctionID", OSD.FromBinary(uintToByteArray(parcelPropertiesPacket.ParcelData.AuctionID)));
|
||||
parcelDataMap.Add("AuthBuyerID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.AuthBuyerID));
|
||||
parcelDataMap.Add("Bitmap", OSD.FromBinary(parcelPropertiesPacket.ParcelData.Bitmap));
|
||||
parcelDataMap.Add("Category", OSD.FromInteger((int)parcelPropertiesPacket.ParcelData.Category));
|
||||
parcelDataMap.Add("ClaimDate", OSD.FromInteger(parcelPropertiesPacket.ParcelData.ClaimDate));
|
||||
parcelDataMap.Add("ClaimPrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.ClaimPrice));
|
||||
parcelDataMap.Add("Desc", OSD.FromString(Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc)));
|
||||
parcelDataMap.Add("GroupID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.GroupID));
|
||||
parcelDataMap.Add("GroupPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.GroupPrims));
|
||||
parcelDataMap.Add("IsGroupOwned", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.IsGroupOwned));
|
||||
parcelDataMap.Add("LandingType", OSD.FromInteger(parcelPropertiesPacket.ParcelData.LandingType));
|
||||
parcelDataMap.Add("LocalID", OSD.FromInteger(parcelPropertiesPacket.ParcelData.LocalID));
|
||||
parcelDataMap.Add("MaxPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.MaxPrims));
|
||||
parcelDataMap.Add("MediaAutoScale", OSD.FromInteger((int)parcelPropertiesPacket.ParcelData.MediaAutoScale));
|
||||
parcelDataMap.Add("MediaID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.MediaID));
|
||||
parcelDataMap.Add("MediaURL", OSD.FromString(Utils.BytesToString(parcelPropertiesPacket.ParcelData.MediaURL)));
|
||||
parcelDataMap.Add("MusicURL", OSD.FromString(Utils.BytesToString(parcelPropertiesPacket.ParcelData.MusicURL)));
|
||||
parcelDataMap.Add("Name", OSD.FromString(Utils.BytesToString(parcelPropertiesPacket.ParcelData.Name)));
|
||||
parcelDataMap.Add("OtherCleanTime", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OtherCleanTime));
|
||||
parcelDataMap.Add("OtherCount", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OtherCount));
|
||||
parcelDataMap.Add("OtherPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OtherPrims));
|
||||
parcelDataMap.Add("OwnerID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.OwnerID));
|
||||
parcelDataMap.Add("OwnerPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OwnerPrims));
|
||||
parcelDataMap.Add("ParcelFlags", OSD.FromBinary(uintToByteArray(parcelPropertiesPacket.ParcelData.ParcelFlags)));
|
||||
parcelDataMap.Add("ParcelPrimBonus", OSD.FromReal(parcelPropertiesPacket.ParcelData.ParcelPrimBonus));
|
||||
parcelDataMap.Add("PassHours", OSD.FromReal(parcelPropertiesPacket.ParcelData.PassHours));
|
||||
parcelDataMap.Add("PassPrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.PassPrice));
|
||||
parcelDataMap.Add("PublicCount", OSD.FromInteger(parcelPropertiesPacket.ParcelData.PublicCount));
|
||||
parcelDataMap.Add("RegionDenyAnonymous", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.RegionDenyAnonymous));
|
||||
parcelDataMap.Add("RegionDenyIdentified", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.RegionDenyIdentified));
|
||||
parcelDataMap.Add("RegionDenyTransacted", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.RegionDenyTransacted));
|
||||
|
||||
parcelDataMap.Add("RegionPushOverride", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.RegionPushOverride));
|
||||
parcelDataMap.Add("RentPrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.RentPrice));
|
||||
parcelDataMap.Add("RequestResult", OSD.FromInteger(parcelPropertiesPacket.ParcelData.RequestResult));
|
||||
parcelDataMap.Add("SalePrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SalePrice));
|
||||
parcelDataMap.Add("SelectedPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SelectedPrims));
|
||||
parcelDataMap.Add("SelfCount", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SelfCount));
|
||||
parcelDataMap.Add("SequenceID", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SequenceID));
|
||||
parcelDataMap.Add("SimWideMaxPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SimWideMaxPrims));
|
||||
parcelDataMap.Add("SimWideTotalPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.SimWideTotalPrims));
|
||||
parcelDataMap.Add("SnapSelection", OSD.FromBoolean(parcelPropertiesPacket.ParcelData.SnapSelection));
|
||||
parcelDataMap.Add("SnapshotID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.SnapshotID));
|
||||
parcelDataMap.Add("Status", OSD.FromInteger((int)parcelPropertiesPacket.ParcelData.Status));
|
||||
parcelDataMap.Add("TotalPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.TotalPrims));
|
||||
|
||||
OSDArray UserLocation = new OSDArray(3);
|
||||
UserLocation.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLocation.X));
|
||||
UserLocation.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLocation.Y));
|
||||
UserLocation.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLocation.Z));
|
||||
parcelDataMap.Add("UserLocation", UserLocation);
|
||||
|
||||
OSDArray UserLookAt = new OSDArray(3);
|
||||
UserLookAt.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLookAt.X));
|
||||
UserLookAt.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLookAt.Y));
|
||||
UserLookAt.Add(OSD.FromReal(parcelPropertiesPacket.ParcelData.UserLookAt.Z));
|
||||
parcelDataMap.Add("UserLookAt", UserLookAt);
|
||||
|
||||
parcelData.Add(parcelDataMap);
|
||||
body.Add("ParcelData", parcelData);
|
||||
parcelProperties.Add("body", body);
|
||||
parcelProperties.Add("message", OSD.FromString("ParcelProperties"));
|
||||
|
||||
return parcelProperties;
|
||||
}
|
||||
|
||||
public static OSD GroupMembership(AgentGroupDataUpdatePacket groupUpdatePacket)
|
||||
{
|
||||
OSDMap groupUpdate = new OSDMap();
|
||||
@@ -495,5 +386,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
return placesReply;
|
||||
}
|
||||
|
||||
public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage)
|
||||
{
|
||||
OSDMap message = new OSDMap();
|
||||
message.Add("message", OSD.FromString("ParcelProperties"));
|
||||
OSD message_body = parcelPropertiesMessage.Serialize();
|
||||
message.Add("body", message_body);
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user