Merge branch 'avination-current' into careminster

Conflicts:
	OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
	OpenSim/Region/Framework/Interfaces/IDynamicMenuModule.cs
	OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
	OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
This commit is contained in:
Melanie
2013-06-06 03:20:15 +01:00
29 changed files with 559 additions and 52 deletions

View File

@@ -376,7 +376,7 @@ namespace OpenSim.Region.ClientStack.Linden
// TODO: Add EventQueueGet name/description for diagnostics
MainServer.Instance.AddPollServiceHTTPHandler(
eventQueueGetPath,
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID, 1000));
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID, 40000));
// m_log.DebugFormat(
// "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}",

View File

@@ -56,6 +56,7 @@ namespace OpenSim.Region.ClientStack.Linden
public PollServiceTextureEventArgs thepoll;
public UUID reqID;
public Hashtable request;
public bool send503;
}
public class aPollResponse
@@ -244,7 +245,19 @@ namespace OpenSim.Region.ClientStack.Linden
reqinfo.thepoll = this;
reqinfo.reqID = x;
reqinfo.request = y;
reqinfo.send503 = false;
lock (responses)
{
if (responses.Count > 0)
{
if (m_queue.Count >= 4)
{
// Never allow more than 4 fetches to wait
reqinfo.send503 = true;
}
}
}
m_queue.Enqueue(reqinfo);
};
@@ -276,6 +289,22 @@ namespace OpenSim.Region.ClientStack.Linden
UUID requestID = requestinfo.reqID;
if (requestinfo.send503)
{
response = new Hashtable();
response["int_response_code"] = 503;
response["str_response_string"] = "Throttled";
response["content_type"] = "text/plain";
response["keepalive"] = false;
response["reusecontext"] = false;
lock (responses)
responses[requestID] = new aPollResponse() {bytes = 0, response = response};
return;
}
// If the avatar is gone, don't bother to get the texture
if (m_scene.GetScenePresence(Id) == null)
{
@@ -385,6 +414,9 @@ namespace OpenSim.Region.ClientStack.Linden
GetTextureModule.aPollResponse response;
if (responses.TryGetValue(key, out response))
{
// This is any error response
if (response.bytes == 0)
return true;
// Normal
if (BytesSent + response.bytes <= ThrottleBytes)
@@ -411,12 +443,12 @@ namespace OpenSim.Region.ClientStack.Linden
return haskey;
}
public void ProcessTime()
{
PassTime();
}
private void PassTime()
{
currenttime = Util.EnvironmentTickCount();

View File

@@ -1741,7 +1741,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
newBlock.CreationDate = item.CreationDate;
newBlock.SalePrice = item.SalePrice;
newBlock.SaleType = item.SaleType;
newBlock.Flags = item.Flags;
newBlock.Flags = item.Flags & 0xff;
newBlock.CRC =
Helpers.InventoryCRC(newBlock.CreationDate, newBlock.SaleType,
@@ -1995,7 +1995,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
itemBlock.GroupID = item.GroupID;
itemBlock.GroupOwned = item.GroupOwned;
itemBlock.GroupMask = item.GroupPermissions;
itemBlock.Flags = item.Flags;
itemBlock.Flags = item.Flags & 0xff;
itemBlock.SalePrice = item.SalePrice;
itemBlock.SaleType = item.SaleType;
itemBlock.CreationDate = item.CreationDate;
@@ -2062,7 +2062,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
bulkUpdate.ItemData[0].GroupID = item.GroupID;
bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned;
bulkUpdate.ItemData[0].GroupMask = item.GroupPermissions;
bulkUpdate.ItemData[0].Flags = item.Flags;
bulkUpdate.ItemData[0].Flags = item.Flags & 0xff;
bulkUpdate.ItemData[0].SalePrice = item.SalePrice;
bulkUpdate.ItemData[0].SaleType = item.SaleType;
@@ -2116,7 +2116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
InventoryReply.InventoryData[0].GroupID = Item.GroupID;
InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned;
InventoryReply.InventoryData[0].GroupMask = Item.GroupPermissions;
InventoryReply.InventoryData[0].Flags = Item.Flags;
InventoryReply.InventoryData[0].Flags = Item.Flags & 0xff;
InventoryReply.InventoryData[0].SalePrice = Item.SalePrice;
InventoryReply.InventoryData[0].SaleType = Item.SaleType;
InventoryReply.InventoryData[0].CreationDate = Item.CreationDate;
@@ -5137,6 +5137,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
data.CollisionPlane.ToBytes(objectData, 0);
offsetPosition.ToBytes(objectData, 16);
Vector3 velocity = new Vector3(0, 0, 0);
Vector3 acceleration = new Vector3(0, 0, 0);
velocity.ToBytes(objectData, 28);
acceleration.ToBytes(objectData, 40);
// data.Velocity.ToBytes(objectData, 28);
// data.Acceleration.ToBytes(objectData, 40);
rotation.ToBytes(objectData, 52);

View File

@@ -1135,7 +1135,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (!udpClient.IsConnected)
{
// m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet for a unConnected client in " + m_scene.RegionInfo.RegionName);
m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet for a unConnected client in " + m_scene.RegionInfo.RegionName);
return;
}