aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-25 16:13:02 -0400
committerTeravus Ovares (Dan Olivares)2009-08-25 16:13:02 -0400
commita7917b428a6bc3c9e33da64879b9e473516540a3 (patch)
tree2c38d9c33c4977a3d0356912915082a8bd568a23 /OpenSim/Region/ClientStack
parentPatch from jhurliman to HttpServer (diff)
parentImplemented osPenCap, that sets EndCap and StartCap to Pen. This allows using... (diff)
downloadopensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.zip
opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.gz
opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.bz2
opensim-SC-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.xz
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs78
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs36
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs11
3 files changed, 78 insertions, 47 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 06bea3d..dd01780 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2177,7 +2177,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2177 bulkUpdate.AgentData.AgentID = AgentId; 2177 bulkUpdate.AgentData.AgentID = AgentId;
2178 bulkUpdate.AgentData.TransactionID = transactionId; 2178 bulkUpdate.AgentData.TransactionID = transactionId;
2179 bulkUpdate.FolderData = folderDataBlocks.ToArray(); 2179 bulkUpdate.FolderData = folderDataBlocks.ToArray();
2180 2180 List<BulkUpdateInventoryPacket.ItemDataBlock> foo = new List<BulkUpdateInventoryPacket.ItemDataBlock>();
2181 bulkUpdate.ItemData = foo.ToArray();
2182
2181 //m_log.Debug("SendBulkUpdateInventory :" + bulkUpdate); 2183 //m_log.Debug("SendBulkUpdateInventory :" + bulkUpdate);
2182 OutPacket(bulkUpdate, ThrottleOutPacketType.Asset); 2184 OutPacket(bulkUpdate, ThrottleOutPacketType.Asset);
2183 } 2185 }
@@ -6633,9 +6635,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6633 } 6635 }
6634 else // Agent 6636 else // Agent
6635 { 6637 {
6636 //InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
6637 IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>(); 6638 IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>();
6638 InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(itemID)); 6639 InventoryItemBase assetRequestItem = new InventoryItemBase(itemID, AgentId);
6640 assetRequestItem = invService.GetItem(assetRequestItem);
6639 if (assetRequestItem == null) 6641 if (assetRequestItem == null)
6640 { 6642 {
6641 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); 6643 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);
@@ -7027,14 +7029,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7027 if (OnMoveInventoryItem != null) 7029 if (OnMoveInventoryItem != null)
7028 { 7030 {
7029 handlerMoveInventoryItem = null; 7031 handlerMoveInventoryItem = null;
7032 InventoryItemBase itm = null;
7033 List<InventoryItemBase> items = new List<InventoryItemBase>();
7030 foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData) 7034 foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData)
7031 { 7035 {
7032 handlerMoveInventoryItem = OnMoveInventoryItem; 7036 itm = new InventoryItemBase(datablock.ItemID, AgentId);
7033 if (handlerMoveInventoryItem != null) 7037 itm.Folder = datablock.FolderID;
7034 { 7038 itm.Name = Util.FieldToString(datablock.NewName);
7035 handlerMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length, 7039 // weird, comes out as empty string
7036 Util.FieldToString(datablock.NewName)); 7040 //m_log.DebugFormat("[XXX] new name: {0}", itm.Name);
7037 } 7041 items.Add(itm);
7042 }
7043 handlerMoveInventoryItem = OnMoveInventoryItem;
7044 if (handlerMoveInventoryItem != null)
7045 {
7046 handlerMoveInventoryItem(this, items);
7038 } 7047 }
7039 } 7048 }
7040 break; 7049 break;
@@ -7053,14 +7062,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7053 if (OnRemoveInventoryItem != null) 7062 if (OnRemoveInventoryItem != null)
7054 { 7063 {
7055 handlerRemoveInventoryItem = null; 7064 handlerRemoveInventoryItem = null;
7065 List<UUID> uuids = new List<UUID>();
7056 foreach (RemoveInventoryItemPacket.InventoryDataBlock datablock in removeItem.InventoryData) 7066 foreach (RemoveInventoryItemPacket.InventoryDataBlock datablock in removeItem.InventoryData)
7057 { 7067 {
7058 handlerRemoveInventoryItem = OnRemoveInventoryItem; 7068 uuids.Add(datablock.ItemID);
7059 if (handlerRemoveInventoryItem != null) 7069 }
7060 { 7070 handlerRemoveInventoryItem = OnRemoveInventoryItem;
7061 handlerRemoveInventoryItem(this, datablock.ItemID); 7071 if (handlerRemoveInventoryItem != null)
7062 } 7072 {
7073 handlerRemoveInventoryItem(this, uuids);
7063 } 7074 }
7075
7064 } 7076 }
7065 break; 7077 break;
7066 case PacketType.RemoveInventoryFolder: 7078 case PacketType.RemoveInventoryFolder:
@@ -7078,14 +7090,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7078 if (OnRemoveInventoryFolder != null) 7090 if (OnRemoveInventoryFolder != null)
7079 { 7091 {
7080 handlerRemoveInventoryFolder = null; 7092 handlerRemoveInventoryFolder = null;
7093 List<UUID> uuids = new List<UUID>();
7081 foreach (RemoveInventoryFolderPacket.FolderDataBlock datablock in removeFolder.FolderData) 7094 foreach (RemoveInventoryFolderPacket.FolderDataBlock datablock in removeFolder.FolderData)
7082 { 7095 {
7083 handlerRemoveInventoryFolder = OnRemoveInventoryFolder; 7096 uuids.Add(datablock.FolderID);
7084 7097 }
7085 if (handlerRemoveInventoryFolder != null) 7098 handlerRemoveInventoryFolder = OnRemoveInventoryFolder;
7086 { 7099 if (handlerRemoveInventoryFolder != null)
7087 handlerRemoveInventoryFolder(this, datablock.FolderID); 7100 {
7088 } 7101 handlerRemoveInventoryFolder(this, uuids);
7089 } 7102 }
7090 } 7103 }
7091 break; 7104 break;
@@ -7102,27 +7115,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7102 if (OnRemoveInventoryFolder != null) 7115 if (OnRemoveInventoryFolder != null)
7103 { 7116 {
7104 handlerRemoveInventoryFolder = null; 7117 handlerRemoveInventoryFolder = null;
7118 List<UUID> uuids = new List<UUID>();
7105 foreach (RemoveInventoryObjectsPacket.FolderDataBlock datablock in removeObject.FolderData) 7119 foreach (RemoveInventoryObjectsPacket.FolderDataBlock datablock in removeObject.FolderData)
7106 { 7120 {
7107 handlerRemoveInventoryFolder = OnRemoveInventoryFolder; 7121 uuids.Add(datablock.FolderID);
7108 7122 }
7109 if (handlerRemoveInventoryFolder != null) 7123 handlerRemoveInventoryFolder = OnRemoveInventoryFolder;
7110 { 7124 if (handlerRemoveInventoryFolder != null)
7111 handlerRemoveInventoryFolder(this, datablock.FolderID); 7125 {
7112 } 7126 handlerRemoveInventoryFolder(this, uuids);
7113 } 7127 }
7114 } 7128 }
7115 7129
7116 if (OnRemoveInventoryItem != null) 7130 if (OnRemoveInventoryItem != null)
7117 { 7131 {
7118 handlerRemoveInventoryItem = null; 7132 handlerRemoveInventoryItem = null;
7133 List<UUID> uuids = new List<UUID>();
7119 foreach (RemoveInventoryObjectsPacket.ItemDataBlock datablock in removeObject.ItemData) 7134 foreach (RemoveInventoryObjectsPacket.ItemDataBlock datablock in removeObject.ItemData)
7120 { 7135 {
7121 handlerRemoveInventoryItem = OnRemoveInventoryItem; 7136 uuids.Add(datablock.ItemID);
7122 if (handlerRemoveInventoryItem != null) 7137 }
7123 { 7138 handlerRemoveInventoryItem = OnRemoveInventoryItem;
7124 handlerRemoveInventoryItem(this, datablock.ItemID); 7139 if (handlerRemoveInventoryItem != null)
7125 } 7140 {
7141 handlerRemoveInventoryItem(this, uuids);
7126 } 7142 }
7127 } 7143 }
7128 break; 7144 break;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index bf0b06d..798c1e7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -128,28 +128,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP
128 // Store the throttle multiplier for posterity. 128 // Store the throttle multiplier for posterity.
129 throttleMultiplier = userSettings.ClientThrottleMultipler; 129 throttleMultiplier = userSettings.ClientThrottleMultipler;
130 130
131
132 int throttleMaxBPS = 1500000;
133 if (userSettings.TotalThrottleSettings != null)
134 throttleMaxBPS = userSettings.TotalThrottleSettings.Max;
135
131 // Set up the throttle classes (min, max, current) in bits per second 136 // Set up the throttle classes (min, max, current) in bits per second
132 ResendThrottle = new LLPacketThrottle(5000, 100000, 16000, userSettings.ClientThrottleMultipler); 137 ResendThrottle = new LLPacketThrottle(5000, throttleMaxBPS / 15, 16000, userSettings.ClientThrottleMultipler);
133 LandThrottle = new LLPacketThrottle(1000, 100000, 2000, userSettings.ClientThrottleMultipler); 138 LandThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 15, 2000, userSettings.ClientThrottleMultipler);
134 WindThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler); 139 WindThrottle = new LLPacketThrottle(0, throttleMaxBPS / 15, 0, userSettings.ClientThrottleMultipler);
135 CloudThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler); 140 CloudThrottle = new LLPacketThrottle(0, throttleMaxBPS / 15, 0, userSettings.ClientThrottleMultipler);
136 TaskThrottle = new LLPacketThrottle(1000, 800000, 3000, userSettings.ClientThrottleMultipler); 141 TaskThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 3000, userSettings.ClientThrottleMultipler);
137 AssetThrottle = new LLPacketThrottle(1000, 800000, 1000, userSettings.ClientThrottleMultipler); 142 AssetThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 1000, userSettings.ClientThrottleMultipler);
138 TextureThrottle = new LLPacketThrottle(1000, 800000, 4000, userSettings.ClientThrottleMultipler); 143 TextureThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 4000, userSettings.ClientThrottleMultipler);
139 144
140 // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second. 145
146 // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second.
147
148
141 ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings; 149 ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings;
142 if (null == totalThrottleSettings) 150 if (null == totalThrottleSettings)
143 { 151 {
144 totalThrottleSettings = new ThrottleSettings(0, 1500000, 28000); 152 totalThrottleSettings = new ThrottleSettings(0, throttleMaxBPS, 28000);
145 } 153 }
146 154
147 TotalThrottle 155 TotalThrottle
148 = new LLPacketThrottle( 156 = new LLPacketThrottle(
149 totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current, 157 totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current,
150 userSettings.ClientThrottleMultipler); 158 userSettings.ClientThrottleMultipler);
151 159
152 throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); 160 throttleTimer = new Timer((int)(throttletimems / throttleTimeDivisor));
153 throttleTimer.Elapsed += ThrottleTimerElapsed; 161 throttleTimer.Elapsed += ThrottleTimerElapsed;
154 throttleTimer.Start(); 162 throttleTimer.Start();
155 163
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 5184e35..9ee8df5 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -152,11 +152,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
152 ClientStackUserSettings userSettings = new ClientStackUserSettings(); 152 ClientStackUserSettings userSettings = new ClientStackUserSettings();
153 153
154 IConfig config = configSource.Configs["ClientStack.LindenUDP"]; 154 IConfig config = configSource.Configs["ClientStack.LindenUDP"];
155 155
156 if (config != null) 156 if (config != null)
157 { 157 {
158 if (config.Contains("client_throttle_max_bps"))
159 {
160 int maxBPS = config.GetInt("client_throttle_max_bps", 1500000);
161 userSettings.TotalThrottleSettings = new ThrottleSettings(0, maxBPS,
162 maxBPS > 28000 ? maxBPS : 28000);
163 }
164
158 if (config.Contains("client_throttle_multiplier")) 165 if (config.Contains("client_throttle_multiplier"))
159 userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier"); 166 userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier");
160 if (config.Contains("client_socket_rcvbuf_size")) 167 if (config.Contains("client_socket_rcvbuf_size"))
161 m_clientSocketReceiveBuffer = config.GetInt("client_socket_rcvbuf_size"); 168 m_clientSocketReceiveBuffer = config.GetInt("client_socket_rcvbuf_size");
162 } 169 }