diff options
author | BlueWall | 2012-01-03 12:22:13 -0500 |
---|---|---|
committer | BlueWall | 2012-01-03 12:22:13 -0500 |
commit | e78a3913e03b387cae9f9885bfbc4bc4e6f79381 (patch) | |
tree | 1360cefc23ae2516e79a80293b17576fca07d04d | |
parent | Merge branch 'new_modules' (diff) | |
parent | Reduce accessibility of some J2KImage/LLImageManager properties and methods t... (diff) | |
download | opensim-SC_OLD-e78a3913e03b387cae9f9885bfbc4bc4e6f79381.zip opensim-SC_OLD-e78a3913e03b387cae9f9885bfbc4bc4e6f79381.tar.gz opensim-SC_OLD-e78a3913e03b387cae9f9885bfbc4bc4e6f79381.tar.bz2 opensim-SC_OLD-e78a3913e03b387cae9f9885bfbc4bc4e6f79381.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
7 files changed, 109 insertions, 84 deletions
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index e91a4b8..3ce4e66 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | |||
@@ -240,78 +240,84 @@ namespace OpenSim.Capabilities.Handlers | |||
240 | 240 | ||
241 | if (containingFolder != null) | 241 | if (containingFolder != null) |
242 | { | 242 | { |
243 | version = containingFolder.Version; | 243 | // m_log.DebugFormat( |
244 | // "[WEB FETCH INV DESC HANDLER]: Retrieved folder {0} {1} for agent id {2}", | ||
245 | // containingFolder.Name, containingFolder.ID, agentID); | ||
244 | 246 | ||
245 | if (fetchItems) | 247 | version = containingFolder.Version; |
246 | { | 248 | // |
247 | /* | 249 | // if (fetchItems) |
248 | List<InventoryItemBase> linkedItemsToAdd = new List<InventoryItemBase>(); | 250 | // { |
249 | 251 | // List<InventoryItemBase> linkedItemsToAdd = new List<InventoryItemBase>(); | |
250 | foreach (InventoryItemBase item in contents.Items) | 252 | // |
251 | { | 253 | // foreach (InventoryItemBase item in contents.Items) |
252 | if (item.AssetType == (int)AssetType.Link) | 254 | // { |
253 | { | 255 | // if (item.AssetType == (int)AssetType.Link) |
254 | InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | 256 | // { |
255 | 257 | // InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | |
256 | // Take care of genuinely broken links where the target doesn't exist | 258 | // |
257 | // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, | 259 | // // Take care of genuinely broken links where the target doesn't exist |
258 | // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles | 260 | // // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, |
259 | // rather than having to keep track of every folder requested in the recursion. | 261 | // // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles |
260 | if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link && linkedItem.AssetType == (int)AssetType.Object) | 262 | // // rather than having to keep track of every folder requested in the recursion. |
261 | linkedItemsToAdd.Add(linkedItem); | 263 | // if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) |
262 | } | 264 | // linkedItemsToAdd.Insert(0, linkedItem); |
263 | } | 265 | // } |
264 | 266 | // } | |
265 | foreach (InventoryItemBase linkedItem in linkedItemsToAdd) | 267 | // |
266 | { | 268 | // foreach (InventoryItemBase linkedItem in linkedItemsToAdd) |
267 | m_log.DebugFormat( | 269 | // { |
268 | "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}", | 270 | // m_log.DebugFormat( |
269 | linkedItem.Name, folderID, agentID); | 271 | // "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}", |
270 | 272 | // linkedItem.Name, folderID, agentID); | |
271 | contents.Items.Insert(0, linkedItem); | 273 | // |
272 | } | 274 | // contents.Items.Add(linkedItem); |
273 | */ | 275 | // } |
274 | 276 | // | |
275 | /* | 277 | // // If the folder requested contains links, then we need to send those folders first, otherwise the links |
276 | // If the folder requested contains links, then we need to send those folders first, otherwise the links | 278 | // // will be broken in the viewer. |
277 | // will be broken in the viewer. | 279 | // HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>(); |
278 | HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>(); | 280 | // foreach (InventoryItemBase item in contents.Items) |
279 | foreach (InventoryItemBase item in contents.Items) | 281 | // { |
280 | { | 282 | // if (item.AssetType == (int)AssetType.Link) |
281 | if (item.AssetType == (int)AssetType.Link) | 283 | // { |
282 | { | 284 | // InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); |
283 | InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | 285 | // |
284 | 286 | // // Take care of genuinely broken links where the target doesn't exist | |
285 | // Take care of genuinely broken links where the target doesn't exist | 287 | // // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, |
286 | // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, | 288 | // // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles |
287 | // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles | 289 | // // rather than having to keep track of every folder requested in the recursion. |
288 | // rather than having to keep track of every folder requested in the recursion. | 290 | // if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) |
289 | if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) | 291 | // { |
290 | { | 292 | // // We don't need to send the folder if source and destination of the link are in the same |
291 | // We don't need to send the folder if source and destination of the link are in the same | 293 | // // folder. |
292 | // folder. | 294 | // if (linkedItem.Folder != containingFolder.ID) |
293 | if (linkedItem.Folder != containingFolder.ID) | 295 | // linkedItemFolderIdsToSend.Add(linkedItem.Folder); |
294 | linkedItemFolderIdsToSend.Add(linkedItem.Folder); | 296 | // } |
295 | } | 297 | // } |
296 | } | 298 | // } |
297 | } | 299 | // |
298 | 300 | // foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) | |
299 | foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) | 301 | // { |
300 | { | 302 | // m_log.DebugFormat( |
301 | m_log.DebugFormat( | 303 | // "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}", |
302 | "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}", | 304 | // linkedItemFolderId, folderID, agentID); |
303 | linkedItemFolderId, folderID, agentID); | 305 | // |
304 | 306 | // int dummyVersion; | |
305 | int dummyVersion; | 307 | // InventoryCollection linkedCollection |
306 | InventoryCollection linkedCollection | 308 | // = Fetch( |
307 | = Fetch( | 309 | // agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion); |
308 | agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion); | 310 | // |
309 | 311 | // InventoryFolderBase linkedFolder = new InventoryFolderBase(linkedItemFolderId); | |
310 | contents.Folders.AddRange(linkedCollection.Folders); | 312 | // linkedFolder.Owner = agentID; |
311 | contents.Items.AddRange(linkedCollection.Items); | 313 | // linkedFolder = m_InventoryService.GetFolder(linkedFolder); |
312 | } | 314 | // |
313 | */ | 315 | //// contents.Folders.AddRange(linkedCollection.Folders); |
314 | } | 316 | // |
317 | // contents.Folders.Add(linkedFolder); | ||
318 | // contents.Items.AddRange(linkedCollection.Items); | ||
319 | // } | ||
320 | // } | ||
315 | } | 321 | } |
316 | } | 322 | } |
317 | else | 323 | else |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs index 1dea87e..cb9692a 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs | |||
@@ -56,9 +56,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
56 | public IAssetService AssetService; | 56 | public IAssetService AssetService; |
57 | public UUID AgentID; | 57 | public UUID AgentID; |
58 | public IInventoryAccessModule InventoryAccessModule; | 58 | public IInventoryAccessModule InventoryAccessModule; |
59 | public OpenJPEG.J2KLayerInfo[] Layers; | 59 | private OpenJPEG.J2KLayerInfo[] m_layers; |
60 | public bool IsDecoded; | 60 | public bool IsDecoded { get; private set; } |
61 | public bool HasAsset; | 61 | public bool HasAsset { get; private set; } |
62 | public C5.IPriorityQueueHandle<J2KImage> PriorityQueueHandle; | 62 | public C5.IPriorityQueueHandle<J2KImage> PriorityQueueHandle; |
63 | 63 | ||
64 | private uint m_currentPacket; | 64 | private uint m_currentPacket; |
@@ -170,14 +170,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
170 | if (DiscardLevel >= 0 || m_stopPacket == 0) | 170 | if (DiscardLevel >= 0 || m_stopPacket == 0) |
171 | { | 171 | { |
172 | // This shouldn't happen, but if it does, we really can't proceed | 172 | // This shouldn't happen, but if it does, we really can't proceed |
173 | if (Layers == null) | 173 | if (m_layers == null) |
174 | { | 174 | { |
175 | m_log.Warn("[J2KIMAGE]: RunUpdate() called with missing Layers. Canceling texture transfer"); | 175 | m_log.Warn("[J2KIMAGE]: RunUpdate() called with missing Layers. Canceling texture transfer"); |
176 | m_currentPacket = m_stopPacket; | 176 | m_currentPacket = m_stopPacket; |
177 | return; | 177 | return; |
178 | } | 178 | } |
179 | 179 | ||
180 | int maxDiscardLevel = Math.Max(0, Layers.Length - 1); | 180 | int maxDiscardLevel = Math.Max(0, m_layers.Length - 1); |
181 | 181 | ||
182 | // Treat initial texture downloads with a DiscardLevel of -1 a request for the highest DiscardLevel | 182 | // Treat initial texture downloads with a DiscardLevel of -1 a request for the highest DiscardLevel |
183 | if (DiscardLevel < 0 && m_stopPacket == 0) | 183 | if (DiscardLevel < 0 && m_stopPacket == 0) |
@@ -187,9 +187,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
187 | DiscardLevel = (sbyte)Math.Min(DiscardLevel, maxDiscardLevel); | 187 | DiscardLevel = (sbyte)Math.Min(DiscardLevel, maxDiscardLevel); |
188 | 188 | ||
189 | //Calculate the m_stopPacket | 189 | //Calculate the m_stopPacket |
190 | if (Layers.Length > 0) | 190 | if (m_layers.Length > 0) |
191 | { | 191 | { |
192 | m_stopPacket = (uint)GetPacketForBytePosition(Layers[(Layers.Length - 1) - DiscardLevel].End); | 192 | m_stopPacket = (uint)GetPacketForBytePosition(m_layers[(m_layers.Length - 1) - DiscardLevel].End); |
193 | //I don't know why, but the viewer seems to expect the final packet if the file | 193 | //I don't know why, but the viewer seems to expect the final packet if the file |
194 | //is just one packet bigger. | 194 | //is just one packet bigger. |
195 | if (TexturePacketCount() == m_stopPacket + 1) | 195 | if (TexturePacketCount() == m_stopPacket + 1) |
@@ -341,7 +341,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
341 | 341 | ||
342 | private void J2KDecodedCallback(UUID AssetId, OpenJPEG.J2KLayerInfo[] layers) | 342 | private void J2KDecodedCallback(UUID AssetId, OpenJPEG.J2KLayerInfo[] layers) |
343 | { | 343 | { |
344 | Layers = layers; | 344 | m_layers = layers; |
345 | IsDecoded = true; | 345 | IsDecoded = true; |
346 | RunUpdate(); | 346 | RunUpdate(); |
347 | } | 347 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs index 9e0db12..e3a881f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs | |||
@@ -39,6 +39,9 @@ using log4net; | |||
39 | 39 | ||
40 | namespace OpenSim.Region.ClientStack.LindenUDP | 40 | namespace OpenSim.Region.ClientStack.LindenUDP |
41 | { | 41 | { |
42 | /// <summary> | ||
43 | /// This class handles UDP texture requests. | ||
44 | /// </summary> | ||
42 | public class LLImageManager | 45 | public class LLImageManager |
43 | { | 46 | { |
44 | private sealed class J2KImageComparer : IComparer<J2KImage> | 47 | private sealed class J2KImageComparer : IComparer<J2KImage> |
@@ -208,7 +211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
208 | 211 | ||
209 | #region Priority Queue Helpers | 212 | #region Priority Queue Helpers |
210 | 213 | ||
211 | J2KImage GetHighestPriorityImage() | 214 | private J2KImage GetHighestPriorityImage() |
212 | { | 215 | { |
213 | J2KImage image = null; | 216 | J2KImage image = null; |
214 | 217 | ||
@@ -223,23 +226,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
223 | return image; | 226 | return image; |
224 | } | 227 | } |
225 | 228 | ||
226 | void AddImageToQueue(J2KImage image) | 229 | private void AddImageToQueue(J2KImage image) |
227 | { | 230 | { |
228 | image.PriorityQueueHandle = null; | 231 | image.PriorityQueueHandle = null; |
229 | 232 | ||
230 | lock (m_syncRoot) | 233 | lock (m_syncRoot) |
234 | { | ||
231 | try { m_priorityQueue.Add(ref image.PriorityQueueHandle, image); } | 235 | try { m_priorityQueue.Add(ref image.PriorityQueueHandle, image); } |
232 | catch (Exception) { } | 236 | catch (Exception) { } |
237 | } | ||
233 | } | 238 | } |
234 | 239 | ||
235 | void RemoveImageFromQueue(J2KImage image) | 240 | private void RemoveImageFromQueue(J2KImage image) |
236 | { | 241 | { |
237 | lock (m_syncRoot) | 242 | lock (m_syncRoot) |
243 | { | ||
238 | try { m_priorityQueue.Delete(image.PriorityQueueHandle); } | 244 | try { m_priorityQueue.Delete(image.PriorityQueueHandle); } |
239 | catch (Exception) { } | 245 | catch (Exception) { } |
246 | } | ||
240 | } | 247 | } |
241 | 248 | ||
242 | void UpdateImageInQueue(J2KImage image) | 249 | private void UpdateImageInQueue(J2KImage image) |
243 | { | 250 | { |
244 | lock (m_syncRoot) | 251 | lock (m_syncRoot) |
245 | { | 252 | { |
@@ -254,4 +261,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
254 | 261 | ||
255 | #endregion Priority Queue Helpers | 262 | #endregion Priority Queue Helpers |
256 | } | 263 | } |
257 | } | 264 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 1386e86..7dd9087 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -152,6 +152,9 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
152 | /// <param name="j2kData">JPEG2000 data</param> | 152 | /// <param name="j2kData">JPEG2000 data</param> |
153 | private void DoJ2KDecode(UUID assetID, byte[] j2kData) | 153 | private void DoJ2KDecode(UUID assetID, byte[] j2kData) |
154 | { | 154 | { |
155 | // m_log.DebugFormat( | ||
156 | // "[J2KDecoderModule]: Doing J2K decoding of {0} bytes for asset {1}", j2kData.Length, assetID); | ||
157 | |||
155 | //int DecodeTime = 0; | 158 | //int DecodeTime = 0; |
156 | //DecodeTime = Environment.TickCount; | 159 | //DecodeTime = Environment.TickCount; |
157 | OpenJPEG.J2KLayerInfo[] layers; | 160 | OpenJPEG.J2KLayerInfo[] layers; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index cc5d061..2e6ec90 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | |||
@@ -170,6 +170,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
170 | 170 | ||
171 | public AssetBase GetCached(string id) | 171 | public AssetBase GetCached(string id) |
172 | { | 172 | { |
173 | // m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id); | ||
174 | |||
173 | if (m_Cache != null) | 175 | if (m_Cache != null) |
174 | return m_Cache.Get(id); | 176 | return m_Cache.Get(id); |
175 | 177 | ||
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 2194ff0..228eca9 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -2822,6 +2822,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2822 | m_global_contactcount = 0; | 2822 | m_global_contactcount = 0; |
2823 | 2823 | ||
2824 | d.WorldQuickStep(world, ODE_STEPSIZE); | 2824 | d.WorldQuickStep(world, ODE_STEPSIZE); |
2825 | |||
2825 | d.JointGroupEmpty(contactgroup); | 2826 | d.JointGroupEmpty(contactgroup); |
2826 | } | 2827 | } |
2827 | catch (Exception e) | 2828 | catch (Exception e) |
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index fdab254..d7b2ff8 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | |||
@@ -100,6 +100,8 @@ namespace OpenSim.Services.Connectors | |||
100 | 100 | ||
101 | public AssetBase Get(string id) | 101 | public AssetBase Get(string id) |
102 | { | 102 | { |
103 | // m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Synchronous get request for {0}", id); | ||
104 | |||
103 | string uri = m_ServerURI + "/assets/" + id; | 105 | string uri = m_ServerURI + "/assets/" + id; |
104 | 106 | ||
105 | AssetBase asset = null; | 107 | AssetBase asset = null; |
@@ -119,6 +121,8 @@ namespace OpenSim.Services.Connectors | |||
119 | 121 | ||
120 | public AssetBase GetCached(string id) | 122 | public AssetBase GetCached(string id) |
121 | { | 123 | { |
124 | // m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Cache request for {0}", id); | ||
125 | |||
122 | if (m_Cache != null) | 126 | if (m_Cache != null) |
123 | return m_Cache.Get(id); | 127 | return m_Cache.Get(id); |
124 | 128 | ||
@@ -177,6 +181,8 @@ namespace OpenSim.Services.Connectors | |||
177 | 181 | ||
178 | public bool Get(string id, Object sender, AssetRetrieved handler) | 182 | public bool Get(string id, Object sender, AssetRetrieved handler) |
179 | { | 183 | { |
184 | // m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Potentially asynchronous get request for {0}", id); | ||
185 | |||
180 | string uri = m_ServerURI + "/assets/" + id; | 186 | string uri = m_ServerURI + "/assets/" + id; |
181 | 187 | ||
182 | AssetBase asset = null; | 188 | AssetBase asset = null; |