aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-20 17:34:10 +0000
committerJustin Clarke Casey2008-02-20 17:34:10 +0000
commit877713999ce9bcf63e9fafa76cc7d2283ee2e6c2 (patch)
treea777abaadb3556af6933a5ac6fa85af6647629ed /OpenSim/Region/Environment
parentllSetTimerEvent was setting seconds as milliseconds causing major problems in... (diff)
downloadopensim-SC-877713999ce9bcf63e9fafa76cc7d2283ee2e6c2.zip
opensim-SC-877713999ce9bcf63e9fafa76cc7d2283ee2e6c2.tar.gz
opensim-SC-877713999ce9bcf63e9fafa76cc7d2283ee2e6c2.tar.bz2
opensim-SC-877713999ce9bcf63e9fafa76cc7d2283ee2e6c2.tar.xz
* Report 'asset not found' situations back to UserTextureDownloadService
* This fixes some of the 'runaway downloads' problem but not all of it * Also fix up logging messages so texture requests are reported as such rather than as assets
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs24
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs5
3 files changed, 26 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
index 4a94266..24f0981 100644
--- a/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/UserTextureDownloadService.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Environment.Modules
95 new TextureSender(client, e.DiscardLevel, e.PacketNumber); 95 new TextureSender(client, e.DiscardLevel, e.PacketNumber);
96 m_textureSenders.Add(e.RequestedAssetID, requestHandler); 96 m_textureSenders.Add(e.RequestedAssetID, requestHandler);
97 97
98 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback); 98 m_scene.AssetCache.GetAsset(e.RequestedAssetID, TextureCallback, true);
99 } 99 }
100 } 100 }
101 } 101 }
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules
117 /// </summary> 117 /// </summary>
118 /// <param name="textureID"></param> 118 /// <param name="textureID"></param>
119 /// <param name="asset"></param> 119 /// <param name="asset"></param>
120 public void TextureCallback(LLUUID textureID, AssetBase asset) 120 public void TextureCallback(LLUUID textureID, AssetBase texture)
121 { 121 {
122 lock (m_textureSenders) 122 lock (m_textureSenders)
123 { 123 {
@@ -125,10 +125,24 @@ namespace OpenSim.Region.Environment.Modules
125 125
126 if (m_textureSenders.TryGetValue(textureID, out textureSender)) 126 if (m_textureSenders.TryGetValue(textureID, out textureSender))
127 { 127 {
128 if (!textureSender.ImageLoaded) 128 if (null != texture)
129 { 129 {
130 textureSender.TextureReceived(asset); 130 if (!textureSender.ImageLoaded)
131 EnqueueTextureSender(textureSender); 131 {
132 textureSender.TextureReceived(texture);
133 EnqueueTextureSender(textureSender);
134 }
135 }
136 else
137 {
138 // Right now, leaving it up to lower level asset server code to post the fact that
139 // this texture could not be found
140
141 // TODO Send packet back to the client telling it not to expect the texture
142 // The absence of this packet doesn't appear to be causing it a problem right now
143
144 //m_log.InfoFormat("Removing {0} from pending downloads count", textureID);
145 m_scene.AddPendingDownloads(-1);
132 } 146 }
133 147
134 //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID); 148 //m_log.InfoFormat("[TEXTURE SENDER] Removing texture sender with uuid {0}", textureID);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 17c4d6d..dc95002 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Scenes
160 160
161 cache.GetAsset(item.AssetID, delegate(LLUUID assetID, AssetBase asset) 161 cache.GetAsset(item.AssetID, delegate(LLUUID assetID, AssetBase asset)
162 { 162 {
163 if (asset.FullID == LLUUID.Zero) 163 if (null == asset)
164 { 164 {
165 m_log.ErrorFormat( 165 m_log.ErrorFormat(
166 "[PRIMINVENTORY]: " + 166 "[PRIMINVENTORY]: " +
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Scenes
174 m_parentGroup.AddActiveScriptCount(1); 174 m_parentGroup.AddActiveScriptCount(1);
175 ScheduleFullUpdate(); 175 ScheduleFullUpdate();
176 } 176 }
177 }); 177 }, false);
178 } 178 }
179 } 179 }
180 180
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index a0539f0..422189e 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -363,9 +363,14 @@ namespace OpenSim.Region.Environment.Scenes
363 { 363 {
364 m_otherMS += ms; 364 m_otherMS += ms;
365 } 365 }
366
367// private static readonly log4net.ILog m_log
368// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
369
366 public void addPendingDownload(int count) 370 public void addPendingDownload(int count)
367 { 371 {
368 m_pendingDownloads += count; 372 m_pendingDownloads += count;
373 //m_log.InfoFormat("Adding {0} to pending downloads to make {1}", count, m_pendingDownloads);
369 } 374 }
370 375
371 public void addScriptLines(int count) 376 public void addScriptLines(int count)