backport libomv r3475 - mainly for binary OSD serialization compatibility newer versions of OpenMetaverse.StructuredData.dll

0.7.0.1-post-fixes
dahlia 2010-12-21 20:09:06 -08:00
parent 9356dc880f
commit d1ed16be71
15 changed files with 50 additions and 33 deletions

View File

@ -98,8 +98,8 @@ namespace OpenSim.Framework
return "application/vnd.ll.outfitfolder";
case AssetType.MyOutfitsFolder:
return "application/vnd.ll.myoutfitsfolder";
case AssetType.InboxFolder:
return "application/vnd.ll.inboxfolder";
//case AssetType.InboxFolder:
// return "application/vnd.ll.inboxfolder";
case AssetType.Unknown:
default:
return "application/octet-stream";
@ -209,8 +209,6 @@ namespace OpenSim.Framework
return (sbyte)AssetType.OutfitFolder;
case "application/vnd.ll.myoutfitsfolder":
return (sbyte)AssetType.MyOutfitsFolder;
case "application/vnd.ll.inboxfolder":
return (sbyte)AssetType.InboxFolder;
case "application/octet-stream":
default:
return (sbyte)AssetType.Unknown;

View File

@ -3015,7 +3015,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
OSDMap GroupDataMap = new OSDMap(6);
OSDMap NewGroupDataMap = new OSDMap(1);
GroupDataMap.Add("GroupPowers", OSD.FromBinary(m.GroupPowers));
GroupDataMap.Add("GroupPowers", OSD.FromULong(m.GroupPowers));
GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices));
GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle));
GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID));
@ -3475,9 +3475,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void ProcessEntityUpdates(int maxUpdates)
{
Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
int updatesThisCall = 0;

View File

@ -139,14 +139,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void ProcessQueues()
{
// Process all the pending adds
OutgoingPacket pendingAdd;
while (m_pendingAdds.Dequeue(out pendingAdd))
if (m_pendingAdds != null)
{
while (m_pendingAdds.TryDequeue(out pendingAdd))
{
if (pendingAdd != null && m_packets != null)
{
m_packets[pendingAdd.SequenceNumber] = pendingAdd;
}
}
}
// Process all the pending removes, including updating statistics and round-trip times
PendingAck pendingRemove;
OutgoingPacket ackedPacket;
while (m_pendingRemoves.Dequeue(out pendingRemove))
if (m_pendingRemoves != null)
{
while (m_pendingRemoves.TryDequeue(out pendingRemove))
{
if (m_pendingRemoves != null && m_packets != null)
{
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
{
@ -166,4 +179,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
}
}
}
}

View File

@ -252,7 +252,7 @@ namespace Flotsam.RegionModules.AssetCache
}
else
{
m_MemoryCache.AddOrUpdate(key, asset, DateTime.MaxValue);
m_MemoryCache.AddOrUpdate(key, asset, Double.MaxValue);
}
}
}

View File

@ -160,7 +160,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
info.Add("SimAccess", OSD.FromInteger(simAccess));
info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port));
info.Add("TeleportFlags", OSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
OSDArray infoArr = new OSDArray();
infoArr.Add(info);

View File

@ -36,6 +36,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
{
public class UserAccountCache
{
private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours!
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
@ -51,9 +53,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
public void Cache(UUID userID, UserAccount account)
{
// Cache even null accounts
m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d));
m_UUIDCache.AddOrUpdate(userID, account, CACHE_EXPIRATION_SECONDS);
if (account != null)
m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d));
m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_EXPIRATION_SECONDS);
m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
}

View File

@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
SceneObjectPart part2 = CreateSceneObjectPart2();
AssetNotecard nc = new AssetNotecard("Hello World!");
AssetNotecard nc = new AssetNotecard();
UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000");
UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000");
AssetBase ncAsset
@ -328,7 +328,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile());
RegionSettings rs = new RegionSettings();
OpenSim.Framework.RegionSettings rs = new OpenSim.Framework.RegionSettings();
rs.AgentLimit = 17;
rs.AllowDamage = true;
rs.AllowLandJoinDivide = true;
@ -372,7 +372,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
}
Assert.That(m_lastErrorMessage, Is.Null);
RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
OpenSim.Framework.RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
Assert.That(loadedRs.AgentLimit, Is.EqualTo(17));
Assert.That(loadedRs.AllowDamage, Is.True);

View File

@ -1129,7 +1129,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
OSDMap NewGroupDataMap = new OSDMap(1);
GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID));
GroupDataMap.Add("GroupPowers", OSD.FromBinary(membership.GroupPowers));
GroupDataMap.Add("GroupPowers", OSD.FromULong(membership.GroupPowers));
GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices));
GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));

View File

@ -49,6 +49,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule
{
private const double CACHE_EXPIRATION_SECONDS = 120.0;
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
@ -208,7 +210,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
if (success)
{
// Cache the user account info
m_accountCache.AddOrUpdate(data.PrincipalID, data, DateTime.Now + TimeSpan.FromMinutes(2.0d));
m_accountCache.AddOrUpdate(data.PrincipalID, data, CACHE_EXPIRATION_SECONDS);
}
else
{
@ -273,7 +275,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName);
// Cache the user account info
m_accountCache.AddOrUpdate(account.PrincipalID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d));
m_accountCache.AddOrUpdate(account.PrincipalID, account, CACHE_EXPIRATION_SECONDS);
return account;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.