backport libomv r3475 - mainly for binary OSD serialization compatibility newer versions of OpenMetaverse.StructuredData.dll
parent
9356dc880f
commit
d1ed16be71
|
@ -98,8 +98,8 @@ namespace OpenSim.Framework
|
||||||
return "application/vnd.ll.outfitfolder";
|
return "application/vnd.ll.outfitfolder";
|
||||||
case AssetType.MyOutfitsFolder:
|
case AssetType.MyOutfitsFolder:
|
||||||
return "application/vnd.ll.myoutfitsfolder";
|
return "application/vnd.ll.myoutfitsfolder";
|
||||||
case AssetType.InboxFolder:
|
//case AssetType.InboxFolder:
|
||||||
return "application/vnd.ll.inboxfolder";
|
// return "application/vnd.ll.inboxfolder";
|
||||||
case AssetType.Unknown:
|
case AssetType.Unknown:
|
||||||
default:
|
default:
|
||||||
return "application/octet-stream";
|
return "application/octet-stream";
|
||||||
|
@ -209,8 +209,6 @@ namespace OpenSim.Framework
|
||||||
return (sbyte)AssetType.OutfitFolder;
|
return (sbyte)AssetType.OutfitFolder;
|
||||||
case "application/vnd.ll.myoutfitsfolder":
|
case "application/vnd.ll.myoutfitsfolder":
|
||||||
return (sbyte)AssetType.MyOutfitsFolder;
|
return (sbyte)AssetType.MyOutfitsFolder;
|
||||||
case "application/vnd.ll.inboxfolder":
|
|
||||||
return (sbyte)AssetType.InboxFolder;
|
|
||||||
case "application/octet-stream":
|
case "application/octet-stream":
|
||||||
default:
|
default:
|
||||||
return (sbyte)AssetType.Unknown;
|
return (sbyte)AssetType.Unknown;
|
||||||
|
|
|
@ -3015,7 +3015,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
OSDMap GroupDataMap = new OSDMap(6);
|
OSDMap GroupDataMap = new OSDMap(6);
|
||||||
OSDMap NewGroupDataMap = new OSDMap(1);
|
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("AcceptNotices", OSD.FromBoolean(m.AcceptNotices));
|
||||||
GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle));
|
GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle));
|
||||||
GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID));
|
GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID));
|
||||||
|
@ -3475,9 +3475,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
private void ProcessEntityUpdates(int maxUpdates)
|
private void ProcessEntityUpdates(int maxUpdates)
|
||||||
{
|
{
|
||||||
Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
|
OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
|
||||||
Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
|
OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
|
||||||
Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
|
OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
|
||||||
|
|
||||||
if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
|
if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
|
||||||
int updatesThisCall = 0;
|
int updatesThisCall = 0;
|
||||||
|
|
|
@ -139,28 +139,43 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
private void ProcessQueues()
|
private void ProcessQueues()
|
||||||
{
|
{
|
||||||
// Process all the pending adds
|
// Process all the pending adds
|
||||||
|
|
||||||
OutgoingPacket pendingAdd;
|
OutgoingPacket pendingAdd;
|
||||||
while (m_pendingAdds.Dequeue(out pendingAdd))
|
if (m_pendingAdds != null)
|
||||||
m_packets[pendingAdd.SequenceNumber] = pendingAdd;
|
{
|
||||||
|
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
|
// Process all the pending removes, including updating statistics and round-trip times
|
||||||
PendingAck pendingRemove;
|
PendingAck pendingRemove;
|
||||||
OutgoingPacket ackedPacket;
|
OutgoingPacket ackedPacket;
|
||||||
while (m_pendingRemoves.Dequeue(out pendingRemove))
|
if (m_pendingRemoves != null)
|
||||||
{
|
{
|
||||||
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
|
while (m_pendingRemoves.TryDequeue(out pendingRemove))
|
||||||
{
|
{
|
||||||
m_packets.Remove(pendingRemove.SequenceNumber);
|
if (m_pendingRemoves != null && m_packets != null)
|
||||||
|
|
||||||
// Update stats
|
|
||||||
System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
|
|
||||||
|
|
||||||
if (!pendingRemove.FromResend)
|
|
||||||
{
|
{
|
||||||
// Calculate the round-trip time for this packet and its ACK
|
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
|
||||||
int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
|
{
|
||||||
if (rtt > 0)
|
m_packets.Remove(pendingRemove.SequenceNumber);
|
||||||
ackedPacket.Client.UpdateRoundTrip(rtt);
|
|
||||||
|
// Update stats
|
||||||
|
System.Threading.Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
|
||||||
|
|
||||||
|
if (!pendingRemove.FromResend)
|
||||||
|
{
|
||||||
|
// Calculate the round-trip time for this packet and its ACK
|
||||||
|
int rtt = pendingRemove.RemoveTime - ackedPacket.TickCount;
|
||||||
|
if (rtt > 0)
|
||||||
|
ackedPacket.Client.UpdateRoundTrip(rtt);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,7 +252,7 @@ namespace Flotsam.RegionModules.AssetCache
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_MemoryCache.AddOrUpdate(key, asset, DateTime.MaxValue);
|
m_MemoryCache.AddOrUpdate(key, asset, Double.MaxValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||||
info.Add("SimAccess", OSD.FromInteger(simAccess));
|
info.Add("SimAccess", OSD.FromInteger(simAccess));
|
||||||
info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
|
info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
|
||||||
info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port));
|
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();
|
OSDArray infoArr = new OSDArray();
|
||||||
infoArr.Add(info);
|
infoArr.Add(info);
|
||||||
|
|
|
@ -36,6 +36,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
{
|
{
|
||||||
public class UserAccountCache
|
public class UserAccountCache
|
||||||
{
|
{
|
||||||
|
private const double CACHE_EXPIRATION_SECONDS = 120000.0; // 33 hours!
|
||||||
|
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -51,9 +53,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
public void Cache(UUID userID, UserAccount account)
|
public void Cache(UUID userID, UserAccount account)
|
||||||
{
|
{
|
||||||
// Cache even null accounts
|
// 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)
|
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);
|
m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
|
|
||||||
SceneObjectPart part2 = CreateSceneObjectPart2();
|
SceneObjectPart part2 = CreateSceneObjectPart2();
|
||||||
|
|
||||||
AssetNotecard nc = new AssetNotecard("Hello World!");
|
AssetNotecard nc = new AssetNotecard();
|
||||||
UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000");
|
UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000");
|
||||||
UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000");
|
UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000");
|
||||||
AssetBase ncAsset
|
AssetBase ncAsset
|
||||||
|
@ -328,7 +328,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
|
tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
|
||||||
tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile());
|
tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile());
|
||||||
|
|
||||||
RegionSettings rs = new RegionSettings();
|
OpenSim.Framework.RegionSettings rs = new OpenSim.Framework.RegionSettings();
|
||||||
rs.AgentLimit = 17;
|
rs.AgentLimit = 17;
|
||||||
rs.AllowDamage = true;
|
rs.AllowDamage = true;
|
||||||
rs.AllowLandJoinDivide = true;
|
rs.AllowLandJoinDivide = true;
|
||||||
|
@ -372,7 +372,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert.That(m_lastErrorMessage, Is.Null);
|
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.AgentLimit, Is.EqualTo(17));
|
||||||
Assert.That(loadedRs.AllowDamage, Is.True);
|
Assert.That(loadedRs.AllowDamage, Is.True);
|
||||||
|
|
|
@ -1129,7 +1129,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
OSDMap NewGroupDataMap = new OSDMap(1);
|
OSDMap NewGroupDataMap = new OSDMap(1);
|
||||||
|
|
||||||
GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID));
|
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("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices));
|
||||||
GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
|
GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture));
|
||||||
GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));
|
GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution));
|
||||||
|
|
|
@ -49,6 +49,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule
|
public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule
|
||||||
{
|
{
|
||||||
|
private const double CACHE_EXPIRATION_SECONDS = 120.0;
|
||||||
|
|
||||||
private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -208,7 +210,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
// Cache the user account info
|
// 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
|
else
|
||||||
{
|
{
|
||||||
|
@ -273,7 +275,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName);
|
GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName);
|
||||||
|
|
||||||
// Cache the user account info
|
// 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;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
BIN
bin/CSJ2K.dll
BIN
bin/CSJ2K.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/log4net.dll
BIN
bin/log4net.dll
Binary file not shown.
Loading…
Reference in New Issue