aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs12
-rw-r--r--OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs85
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs4
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs9
6 files changed, 106 insertions, 16 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index ae95821..217217e 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
@@ -221,6 +221,7 @@ namespace OpenSim.Capabilities.Handlers
221 int start, end; 221 int start, end;
222 if (TryParseRange(range, out start, out end)) 222 if (TryParseRange(range, out start, out end))
223 { 223 {
224
224 // Before clamping start make sure we can satisfy it in order to avoid 225 // Before clamping start make sure we can satisfy it in order to avoid
225 // sending back the last byte instead of an error status 226 // sending back the last byte instead of an error status
226 if (start >= texture.Data.Length) 227 if (start >= texture.Data.Length)
@@ -266,9 +267,14 @@ namespace OpenSim.Capabilities.Handlers
266 response.Body.Write(texture.Data, 0, texture.Data.Length); 267 response.Body.Write(texture.Data, 0, texture.Data.Length);
267 } 268 }
268 269
269// m_log.DebugFormat( 270// if (response.StatusCode < 200 || response.StatusCode > 299)
270// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", 271// m_log.WarnFormat(
271// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length); 272// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
273// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
274// else
275// m_log.DebugFormat(
276// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
277// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
272 } 278 }
273 279
274 private bool TryParseRange(string header, out int start, out int end) 280 private bool TryParseRange(string header, out int start, out int end)
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
index a086c0e..e91a4b8 100644
--- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
@@ -181,6 +181,15 @@ namespace OpenSim.Capabilities.Handlers
181 contents.descendents = contents.items.Array.Count + contents.categories.Array.Count; 181 contents.descendents = contents.items.Array.Count + contents.categories.Array.Count;
182 contents.version = version; 182 contents.version = version;
183 183
184// m_log.DebugFormat(
185// "[WEB FETCH INV DESC HANDLER]: Replying to request for folder {0} (fetch items {1}, fetch folders {2}) with {3} items and {4} folders for agent {5}",
186// invFetch.folder_id,
187// invFetch.fetch_items,
188// invFetch.fetch_folders,
189// contents.items.Array.Count,
190// contents.categories.Array.Count,
191// invFetch.owner_id);
192
184 return reply; 193 return reply;
185 } 194 }
186 195
@@ -195,7 +204,7 @@ namespace OpenSim.Capabilities.Handlers
195 /// <param name="sortOrder"></param> 204 /// <param name="sortOrder"></param>
196 /// <param name="version"></param> 205 /// <param name="version"></param>
197 /// <returns>An empty InventoryCollection if the inventory look up failed</returns> 206 /// <returns>An empty InventoryCollection if the inventory look up failed</returns>
198 public InventoryCollection Fetch( 207 private InventoryCollection Fetch(
199 UUID agentID, UUID folderID, UUID ownerID, 208 UUID agentID, UUID folderID, UUID ownerID,
200 bool fetchFolders, bool fetchItems, int sortOrder, out int version) 209 bool fetchFolders, bool fetchItems, int sortOrder, out int version)
201 { 210 {
@@ -228,8 +237,82 @@ namespace OpenSim.Capabilities.Handlers
228 containingFolder.ID = folderID; 237 containingFolder.ID = folderID;
229 containingFolder.Owner = agentID; 238 containingFolder.Owner = agentID;
230 containingFolder = m_InventoryService.GetFolder(containingFolder); 239 containingFolder = m_InventoryService.GetFolder(containingFolder);
240
231 if (containingFolder != null) 241 if (containingFolder != null)
242 {
232 version = containingFolder.Version; 243 version = containingFolder.Version;
244
245 if (fetchItems)
246 {
247 /*
248 List<InventoryItemBase> linkedItemsToAdd = new List<InventoryItemBase>();
249
250 foreach (InventoryItemBase item in contents.Items)
251 {
252 if (item.AssetType == (int)AssetType.Link)
253 {
254 InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
255
256 // Take care of genuinely broken links where the target doesn't exist
257 // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
258 // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
259 // rather than having to keep track of every folder requested in the recursion.
260 if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link && linkedItem.AssetType == (int)AssetType.Object)
261 linkedItemsToAdd.Add(linkedItem);
262 }
263 }
264
265 foreach (InventoryItemBase linkedItem in linkedItemsToAdd)
266 {
267 m_log.DebugFormat(
268 "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}",
269 linkedItem.Name, folderID, agentID);
270
271 contents.Items.Insert(0, linkedItem);
272 }
273 */
274
275 /*
276 // If the folder requested contains links, then we need to send those folders first, otherwise the links
277 // will be broken in the viewer.
278 HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>();
279 foreach (InventoryItemBase item in contents.Items)
280 {
281 if (item.AssetType == (int)AssetType.Link)
282 {
283 InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
284
285 // Take care of genuinely broken links where the target doesn't exist
286 // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
287 // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
288 // rather than having to keep track of every folder requested in the recursion.
289 if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
290 {
291 // We don't need to send the folder if source and destination of the link are in the same
292 // folder.
293 if (linkedItem.Folder != containingFolder.ID)
294 linkedItemFolderIdsToSend.Add(linkedItem.Folder);
295 }
296 }
297 }
298
299 foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
300 {
301 m_log.DebugFormat(
302 "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}",
303 linkedItemFolderId, folderID, agentID);
304
305 int dummyVersion;
306 InventoryCollection linkedCollection
307 = Fetch(
308 agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion);
309
310 contents.Folders.AddRange(linkedCollection.Folders);
311 contents.Items.AddRange(linkedCollection.Items);
312 }
313 */
314 }
315 }
233 } 316 }
234 else 317 else
235 { 318 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 3881dcd..70d9f23 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -114,6 +114,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
114 return; 114 return;
115 } 115 }
116 116
117// m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0}", sp.Name);
118
117 List<AvatarAttachment> attachments = sp.Appearance.GetAttachments(); 119 List<AvatarAttachment> attachments = sp.Appearance.GetAttachments();
118 foreach (AvatarAttachment attach in attachments) 120 foreach (AvatarAttachment attach in attachments)
119 { 121 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 245f258..83990b1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -319,11 +319,12 @@ namespace OpenSim.Region.Framework.Scenes
319 // Passing something to another avatar or a an object will already 319 // Passing something to another avatar or a an object will already
320 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); 320 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
321 item = InventoryService.GetItem(item); 321 item = InventoryService.GetItem(item);
322 if (item.Owner != remoteClient.AgentId)
323 return;
324 322
325 if (item != null) 323 if (item != null)
326 { 324 {
325 if (item.Owner != remoteClient.AgentId)
326 return;
327
327 if (UUID.Zero == transactionID) 328 if (UUID.Zero == transactionID)
328 { 329 {
329 item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255); 330 item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255);
@@ -371,8 +372,9 @@ namespace OpenSim.Region.Framework.Scenes
371 } 372 }
372 else 373 else
373 { 374 {
374 m_log.Error( 375 m_log.ErrorFormat(
375 "[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update."); 376 "[AGENTINVENTORY]: Item id {0} not found for an inventory item update for {1}.",
377 itemID, remoteClient.Name);
376 } 378 }
377 } 379 }
378 380
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 21e3d3f..e2c6a08 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -182,10 +182,6 @@ namespace OpenSim.Region.Framework.Scenes
182 182
183 private const int LAND_VELOCITYMAG_MAX = 12; 183 private const int LAND_VELOCITYMAG_MAX = 12;
184 184
185 public bool IsRestrictedToRegion;
186
187 public string JID = String.Empty;
188
189 private float m_health = 100f; 185 private float m_health = 100f;
190 186
191 protected ulong crossingFromRegion; 187 protected ulong crossingFromRegion;
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index e4a3ba0..cf2f46a 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -67,11 +67,12 @@ namespace OpenSim.Region.RegionCombinerModule
67 { 67 {
68 IConfig myConfig = source.Configs["Startup"]; 68 IConfig myConfig = source.Configs["Startup"];
69 enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false); 69 enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
70 //enabledYN = true; 70
71 if (enabledYN) 71 if (enabledYN)
72 MainConsole.Instance.Commands.AddCommand("RegionCombinerModule", false, "fix-phantoms", 72 MainConsole.Instance.Commands.AddCommand(
73 "Fix phantom objects", "Fixes phantom objects after an import to megaregions", FixPhantoms); 73 "RegionCombinerModule", false, "fix-phantoms", "fix-phantoms",
74 } 74 "Fixes phantom objects after an import to megaregions", FixPhantoms);
75 }
75 76
76 public void Close() 77 public void Close()
77 { 78 {