aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2009-11-04 23:54:19 +0000
committerMelanie2009-11-04 23:54:19 +0000
commit30a2411e5816b3e0aa421e4537e554aa640c060f (patch)
tree8ad154533c622440221c45a50b1ad7af7fa310c4
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-30a2411e5816b3e0aa421e4537e554aa640c060f.zip
opensim-SC_OLD-30a2411e5816b3e0aa421e4537e554aa640c060f.tar.gz
opensim-SC_OLD-30a2411e5816b3e0aa421e4537e554aa640c060f.tar.bz2
opensim-SC_OLD-30a2411e5816b3e0aa421e4537e554aa640c060f.tar.xz
Separate folder and item limit for UDP inventory packets. Folder limit is
now 6, as before, item limit is 5. This should avoid most, if not all, oversized packets.
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 2da6d98..70abe77 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1264,7 +1264,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1264 // 1264 //
1265 // for one example of this kind of thing. In fact, the Linden servers appear to only send about 1265 // for one example of this kind of thing. In fact, the Linden servers appear to only send about
1266 // 6 to 7 items at a time, so let's stick with 6 1266 // 6 to 7 items at a time, so let's stick with 6
1267 int MAX_ITEMS_PER_PACKET = 6; 1267 int MAX_ITEMS_PER_PACKET = 5;
1268 int MAX_FOLDERS_PER_PACKET = 6;
1268 1269
1269 int totalItems = fetchItems ? items.Count : 0; 1270 int totalItems = fetchItems ? items.Count : 0;
1270 int totalFolders = fetchFolders ? folders.Count : 0; 1271 int totalFolders = fetchFolders ? folders.Count : 0;
@@ -1287,8 +1288,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1287 if (currentPacket == null) // Start a new packet 1288 if (currentPacket == null) // Start a new packet
1288 { 1289 {
1289 foldersToSend = totalFolders - foldersSent; 1290 foldersToSend = totalFolders - foldersSent;
1290 if (foldersToSend > MAX_ITEMS_PER_PACKET) 1291 if (foldersToSend > MAX_FOLDERS_PER_PACKET)
1291 foldersToSend = MAX_ITEMS_PER_PACKET; 1292 foldersToSend = MAX_FOLDERS_PER_PACKET;
1292 1293
1293 if (foldersToSend == 0) 1294 if (foldersToSend == 0)
1294 { 1295 {
@@ -1301,7 +1302,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1301 } 1302 }
1302 1303
1303 if (foldersToSend-- > 0) 1304 if (foldersToSend-- > 0)
1304 currentPacket.FolderData[foldersSent % MAX_ITEMS_PER_PACKET] = CreateFolderDataBlock(folders[foldersSent++]); 1305 currentPacket.FolderData[foldersSent % MAX_FOLDERS_PER_PACKET] = CreateFolderDataBlock(folders[foldersSent++]);
1305 else if(itemsToSend-- > 0) 1306 else if(itemsToSend-- > 0)
1306 currentPacket.ItemData[itemsSent % MAX_ITEMS_PER_PACKET] = CreateItemDataBlock(items[itemsSent++]); 1307 currentPacket.ItemData[itemsSent % MAX_ITEMS_PER_PACKET] = CreateItemDataBlock(items[itemsSent++]);
1307 else 1308 else