aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2018-12-06 02:28:26 +0000
committerUbitUmarov2018-12-06 02:28:26 +0000
commitd2bfe986bf6736ff83d1e635c63b083a35272cdb (patch)
tree2f77cbb81f2f2de2de0e36f0d4fc69077037cf8d /OpenSim
parentGetAssets: we still need to service avatars that did left region (diff)
downloadopensim-SC-d2bfe986bf6736ff83d1e635c63b083a35272cdb.zip
opensim-SC-d2bfe986bf6736ff83d1e635c63b083a35272cdb.tar.gz
opensim-SC-d2bfe986bf6736ff83d1e635c63b083a35272cdb.tar.bz2
opensim-SC-d2bfe986bf6736ff83d1e635c63b083a35272cdb.tar.xz
GetAssets: only throttle mesh and texture
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs10
2 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs b/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs
index ef64999..099c7b4 100644
--- a/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetAssets/GetAssetsHandler.cs
@@ -136,8 +136,10 @@ namespace OpenSim.Capabilities.Handlers
136 return responsedata; 136 return responsedata;
137 } 137 }
138 138
139 // if(type != AssetType.Mesh && type != AssetType.Texture) 139 if(type == AssetType.Mesh || type == AssetType.Texture)
140 // m_log.Warn("[GETASSETS]: type: " + query); 140 responsedata["throttle"] = true;
141// else
142// m_log.Warn("[GETASSETS]: type: " + query);
141 143
142 responsedata["content_type"] = asset.Metadata.ContentType; 144 responsedata["content_type"] = asset.Metadata.ContentType;
143 responsedata["bin_response_data"] = asset.Data; 145 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 dfb16fa..1208bdf 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
72 { 72 {
73 public Hashtable response; 73 public Hashtable response;
74 public int bytes; 74 public int bytes;
75 public bool throttle;
75 } 76 }
76 77
77 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 78 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -244,7 +245,9 @@ namespace OpenSim.Region.ClientStack.Linden
244 245
245 if (m_presence == null || m_presence.IsDeleted) 246 if (m_presence == null || m_presence.IsDeleted)
246 return true; 247 return true;
247 return m_presence.CapCanSendAsset(1, response.bytes); 248 if(response.throttle)
249 return m_presence.CapCanSendAsset(1, response.bytes);
250 return m_presence.CapCanSendAsset(2, response.bytes);
248 } 251 }
249 return false; 252 return false;
250 } 253 }
@@ -352,11 +355,14 @@ namespace OpenSim.Region.ClientStack.Linden
352 } 355 }
353 } 356 }
354 357
355 responses[requestID] = new APollResponse() 358 APollResponse preq= new APollResponse()
356 { 359 {
357 bytes = (int)curresponse["int_bytes"], 360 bytes = (int)curresponse["int_bytes"],
358 response = curresponse 361 response = curresponse
359 }; 362 };
363 if(curresponse.Contains("throttle"))
364 preq.throttle = true;
365 responses[requestID] = preq;
360 } 366 }
361 } 367 }
362 } 368 }