diff --git a/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs b/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs index ef6499994c..099c7b4b4e 100644 --- a/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs @@ -136,8 +136,10 @@ namespace OpenSim.Capabilities.Handlers return responsedata; } - // if(type != AssetType.Mesh && type != AssetType.Texture) - // m_log.Warn("[GETASSETS]: type: " + query); + if(type == AssetType.Mesh || type == AssetType.Texture) + responsedata["throttle"] = true; +// else +// m_log.Warn("[GETASSETS]: type: " + query); responsedata["content_type"] = asset.Metadata.ContentType; responsedata["bin_response_data"] = asset.Data; diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs index dfb16faa8f..1208bdff6c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs @@ -72,6 +72,7 @@ namespace OpenSim.Region.ClientStack.Linden { public Hashtable response; public int bytes; + public bool throttle; } private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -244,7 +245,9 @@ namespace OpenSim.Region.ClientStack.Linden if (m_presence == null || m_presence.IsDeleted) return true; - return m_presence.CapCanSendAsset(1, response.bytes); + if(response.throttle) + return m_presence.CapCanSendAsset(1, response.bytes); + return m_presence.CapCanSendAsset(2, response.bytes); } return false; } @@ -352,11 +355,14 @@ namespace OpenSim.Region.ClientStack.Linden } } - responses[requestID] = new APollResponse() + APollResponse preq= new APollResponse() { bytes = (int)curresponse["int_bytes"], response = curresponse }; + if(curresponse.Contains("throttle")) + preq.throttle = true; + responses[requestID] = preq; } } }