aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorMelanie2013-06-06 03:20:15 +0100
committerMelanie2013-06-06 03:20:15 +0100
commitfe4a67efb6f54cad3f00884712abe03704216421 (patch)
tree04de93aaa8e9430c7c33e15912b3683b0297a10a /OpenSim/Region/ClientStack/Linden
parentMerge branch 'master' into careminster (diff)
parentUpdate HTTP server (diff)
downloadopensim-SC-fe4a67efb6f54cad3f00884712abe03704216421.zip
opensim-SC-fe4a67efb6f54cad3f00884712abe03704216421.tar.gz
opensim-SC-fe4a67efb6f54cad3f00884712abe03704216421.tar.bz2
opensim-SC-fe4a67efb6f54cad3f00884712abe03704216421.tar.xz
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
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs34
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs12
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs2
4 files changed, 43 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index 37285e3..eb40eb1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -376,7 +376,7 @@ namespace OpenSim.Region.ClientStack.Linden
376 // TODO: Add EventQueueGet name/description for diagnostics 376 // TODO: Add EventQueueGet name/description for diagnostics
377 MainServer.Instance.AddPollServiceHTTPHandler( 377 MainServer.Instance.AddPollServiceHTTPHandler(
378 eventQueueGetPath, 378 eventQueueGetPath,
379 new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID, 1000)); 379 new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID, 40000));
380 380
381// m_log.DebugFormat( 381// m_log.DebugFormat(
382// "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}", 382// "[EVENT QUEUE GET MODULE]: Registered EQG handler {0} for {1} in {2}",
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index d4dbfb9..a42c96c 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -56,6 +56,7 @@ namespace OpenSim.Region.ClientStack.Linden
56 public PollServiceTextureEventArgs thepoll; 56 public PollServiceTextureEventArgs thepoll;
57 public UUID reqID; 57 public UUID reqID;
58 public Hashtable request; 58 public Hashtable request;
59 public bool send503;
59 } 60 }
60 61
61 public class aPollResponse 62 public class aPollResponse
@@ -244,7 +245,19 @@ namespace OpenSim.Region.ClientStack.Linden
244 reqinfo.thepoll = this; 245 reqinfo.thepoll = this;
245 reqinfo.reqID = x; 246 reqinfo.reqID = x;
246 reqinfo.request = y; 247 reqinfo.request = y;
248 reqinfo.send503 = false;
247 249
250 lock (responses)
251 {
252 if (responses.Count > 0)
253 {
254 if (m_queue.Count >= 4)
255 {
256 // Never allow more than 4 fetches to wait
257 reqinfo.send503 = true;
258 }
259 }
260 }
248 m_queue.Enqueue(reqinfo); 261 m_queue.Enqueue(reqinfo);
249 }; 262 };
250 263
@@ -276,6 +289,22 @@ namespace OpenSim.Region.ClientStack.Linden
276 289
277 UUID requestID = requestinfo.reqID; 290 UUID requestID = requestinfo.reqID;
278 291
292 if (requestinfo.send503)
293 {
294 response = new Hashtable();
295
296 response["int_response_code"] = 503;
297 response["str_response_string"] = "Throttled";
298 response["content_type"] = "text/plain";
299 response["keepalive"] = false;
300 response["reusecontext"] = false;
301
302 lock (responses)
303 responses[requestID] = new aPollResponse() {bytes = 0, response = response};
304
305 return;
306 }
307
279 // If the avatar is gone, don't bother to get the texture 308 // If the avatar is gone, don't bother to get the texture
280 if (m_scene.GetScenePresence(Id) == null) 309 if (m_scene.GetScenePresence(Id) == null)
281 { 310 {
@@ -385,6 +414,9 @@ namespace OpenSim.Region.ClientStack.Linden
385 GetTextureModule.aPollResponse response; 414 GetTextureModule.aPollResponse response;
386 if (responses.TryGetValue(key, out response)) 415 if (responses.TryGetValue(key, out response))
387 { 416 {
417 // This is any error response
418 if (response.bytes == 0)
419 return true;
388 420
389 // Normal 421 // Normal
390 if (BytesSent + response.bytes <= ThrottleBytes) 422 if (BytesSent + response.bytes <= ThrottleBytes)
@@ -411,12 +443,12 @@ namespace OpenSim.Region.ClientStack.Linden
411 443
412 return haskey; 444 return haskey;
413 } 445 }
446
414 public void ProcessTime() 447 public void ProcessTime()
415 { 448 {
416 PassTime(); 449 PassTime();
417 } 450 }
418 451
419
420 private void PassTime() 452 private void PassTime()
421 { 453 {
422 currenttime = Util.EnvironmentTickCount(); 454 currenttime = Util.EnvironmentTickCount();
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index ef1d803..c78d552 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -1741,7 +1741,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1741 newBlock.CreationDate = item.CreationDate; 1741 newBlock.CreationDate = item.CreationDate;
1742 newBlock.SalePrice = item.SalePrice; 1742 newBlock.SalePrice = item.SalePrice;
1743 newBlock.SaleType = item.SaleType; 1743 newBlock.SaleType = item.SaleType;
1744 newBlock.Flags = item.Flags; 1744 newBlock.Flags = item.Flags & 0xff;
1745 1745
1746 newBlock.CRC = 1746 newBlock.CRC =
1747 Helpers.InventoryCRC(newBlock.CreationDate, newBlock.SaleType, 1747 Helpers.InventoryCRC(newBlock.CreationDate, newBlock.SaleType,
@@ -1995,7 +1995,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1995 itemBlock.GroupID = item.GroupID; 1995 itemBlock.GroupID = item.GroupID;
1996 itemBlock.GroupOwned = item.GroupOwned; 1996 itemBlock.GroupOwned = item.GroupOwned;
1997 itemBlock.GroupMask = item.GroupPermissions; 1997 itemBlock.GroupMask = item.GroupPermissions;
1998 itemBlock.Flags = item.Flags; 1998 itemBlock.Flags = item.Flags & 0xff;
1999 itemBlock.SalePrice = item.SalePrice; 1999 itemBlock.SalePrice = item.SalePrice;
2000 itemBlock.SaleType = item.SaleType; 2000 itemBlock.SaleType = item.SaleType;
2001 itemBlock.CreationDate = item.CreationDate; 2001 itemBlock.CreationDate = item.CreationDate;
@@ -2062,7 +2062,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2062 bulkUpdate.ItemData[0].GroupID = item.GroupID; 2062 bulkUpdate.ItemData[0].GroupID = item.GroupID;
2063 bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned; 2063 bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned;
2064 bulkUpdate.ItemData[0].GroupMask = item.GroupPermissions; 2064 bulkUpdate.ItemData[0].GroupMask = item.GroupPermissions;
2065 bulkUpdate.ItemData[0].Flags = item.Flags; 2065 bulkUpdate.ItemData[0].Flags = item.Flags & 0xff;
2066 bulkUpdate.ItemData[0].SalePrice = item.SalePrice; 2066 bulkUpdate.ItemData[0].SalePrice = item.SalePrice;
2067 bulkUpdate.ItemData[0].SaleType = item.SaleType; 2067 bulkUpdate.ItemData[0].SaleType = item.SaleType;
2068 2068
@@ -2116,7 +2116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2116 InventoryReply.InventoryData[0].GroupID = Item.GroupID; 2116 InventoryReply.InventoryData[0].GroupID = Item.GroupID;
2117 InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned; 2117 InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned;
2118 InventoryReply.InventoryData[0].GroupMask = Item.GroupPermissions; 2118 InventoryReply.InventoryData[0].GroupMask = Item.GroupPermissions;
2119 InventoryReply.InventoryData[0].Flags = Item.Flags; 2119 InventoryReply.InventoryData[0].Flags = Item.Flags & 0xff;
2120 InventoryReply.InventoryData[0].SalePrice = Item.SalePrice; 2120 InventoryReply.InventoryData[0].SalePrice = Item.SalePrice;
2121 InventoryReply.InventoryData[0].SaleType = Item.SaleType; 2121 InventoryReply.InventoryData[0].SaleType = Item.SaleType;
2122 InventoryReply.InventoryData[0].CreationDate = Item.CreationDate; 2122 InventoryReply.InventoryData[0].CreationDate = Item.CreationDate;
@@ -5137,6 +5137,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5137 5137
5138 data.CollisionPlane.ToBytes(objectData, 0); 5138 data.CollisionPlane.ToBytes(objectData, 0);
5139 offsetPosition.ToBytes(objectData, 16); 5139 offsetPosition.ToBytes(objectData, 16);
5140 Vector3 velocity = new Vector3(0, 0, 0);
5141 Vector3 acceleration = new Vector3(0, 0, 0);
5142 velocity.ToBytes(objectData, 28);
5143 acceleration.ToBytes(objectData, 40);
5140// data.Velocity.ToBytes(objectData, 28); 5144// data.Velocity.ToBytes(objectData, 28);
5141// data.Acceleration.ToBytes(objectData, 40); 5145// data.Acceleration.ToBytes(objectData, 40);
5142 rotation.ToBytes(objectData, 52); 5146 rotation.ToBytes(objectData, 52);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index fab66ce..d008702 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1135,7 +1135,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1135 1135
1136 if (!udpClient.IsConnected) 1136 if (!udpClient.IsConnected)
1137 { 1137 {
1138// m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet for a unConnected client in " + m_scene.RegionInfo.RegionName); 1138 m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet for a unConnected client in " + m_scene.RegionInfo.RegionName);
1139 return; 1139 return;
1140 } 1140 }
1141 1141