aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorOren Hurvitz2014-05-04 13:36:36 +0300
committerOren Hurvitz2014-05-06 07:16:37 +0100
commit0fe08c8799b1a3a2d5a07c206c2f9680d1c0798e (patch)
tree680f0d84eb83f1e4924d8b26ebed7bec5755d029 /OpenSim
parentAdded range-checking for the parameters to PRIM_POINT_LIGHT (used in llSetLin... (diff)
downloadopensim-SC-0fe08c8799b1a3a2d5a07c206c2f9680d1c0798e.zip
opensim-SC-0fe08c8799b1a3a2d5a07c206c2f9680d1c0798e.tar.gz
opensim-SC-0fe08c8799b1a3a2d5a07c206c2f9680d1c0798e.tar.bz2
opensim-SC-0fe08c8799b1a3a2d5a07c206c2f9680d1c0798e.tar.xz
- When sending the "My Suitcase" folder to the client, always claim it has Folder Type 8. (Previously we had used Folder Type -1 in one place, and LLClientView didn't even bother changing Folder Type 100 to anything else.)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs5
-rw-r--r--OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs14
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs4
4 files changed, 17 insertions, 10 deletions
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 5761200..ce63ee0 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -35,6 +35,10 @@ namespace OpenSim.Framework
35 /// </summary> 35 /// </summary>
36 public class InventoryItemBase : InventoryNodeBase, ICloneable 36 public class InventoryItemBase : InventoryNodeBase, ICloneable
37 { 37 {
38 public static readonly string SUITCASE_FOLDER_NAME = "My Suitcase";
39 public static readonly sbyte SUITCASE_FOLDER_TYPE = 100;
40 public static readonly sbyte SUITCASE_FOLDER_FAKE_TYPE = 8;
41
38 /// <value> 42 /// <value>
39 /// The inventory type of the item. This is slightly different from the asset type in some situations. 43 /// The inventory type of the item. This is slightly different from the asset type in some situations.
40 /// </value> 44 /// </value>
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 7cb5b53..53217a0 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -1761,6 +1761,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1761 newBlock.Name = Util.StringToBytes256(folder.Name); 1761 newBlock.Name = Util.StringToBytes256(folder.Name);
1762 newBlock.ParentID = folder.ParentID; 1762 newBlock.ParentID = folder.ParentID;
1763 newBlock.Type = (sbyte)folder.Type; 1763 newBlock.Type = (sbyte)folder.Type;
1764 if (newBlock.Type == InventoryItemBase.SUITCASE_FOLDER_TYPE)
1765 newBlock.Type = InventoryItemBase.SUITCASE_FOLDER_FAKE_TYPE;
1764 1766
1765 return newBlock; 1767 return newBlock;
1766 } 1768 }
@@ -2010,8 +2012,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2010 2012
2011 folderBlock.FolderID = folder.ID; 2013 folderBlock.FolderID = folder.ID;
2012 folderBlock.ParentID = folder.ParentID; 2014 folderBlock.ParentID = folder.ParentID;
2013 //folderBlock.Type = -1;
2014 folderBlock.Type = (sbyte)folder.Type; 2015 folderBlock.Type = (sbyte)folder.Type;
2016 if (folderBlock.Type == InventoryItemBase.SUITCASE_FOLDER_TYPE)
2017 folderBlock.Type = InventoryItemBase.SUITCASE_FOLDER_FAKE_TYPE;
2015 folderBlock.Name = Util.StringToBytes256(folder.Name); 2018 folderBlock.Name = Util.StringToBytes256(folder.Name);
2016 2019
2017 return folderBlock; 2020 return folderBlock;
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 8269d36..df797a5 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -156,9 +156,9 @@ namespace OpenSim.Services.HypergridService
156 if (suitcase == null) 156 if (suitcase == null)
157 { 157 {
158 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: User {0} does not have a Suitcase folder. Creating it...", principalID); 158 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: User {0} does not have a Suitcase folder. Creating it...", principalID);
159 // make one, and let's add it to the user's inventory as a direct child of the root folder 159 // Create the My Suitcase folder under the user's root folder.
160 // In the DB we tag it as type 100, but we use -1 (Unknown) outside 160 // In the DB we tag it as type 100, but we use type 8 (Folder) outside, as this affects the sort order.
161 suitcase = CreateFolder(principalID, root.folderID, 100, "My Suitcase"); 161 suitcase = CreateFolder(principalID, root.folderID, InventoryItemBase.SUITCASE_FOLDER_TYPE, InventoryItemBase.SUITCASE_FOLDER_NAME);
162 if (suitcase == null) 162 if (suitcase == null)
163 { 163 {
164 m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder"); 164 m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder");
@@ -464,7 +464,7 @@ namespace OpenSim.Services.HypergridService
464 // Warp! Root folder for travelers 464 // Warp! Root folder for travelers
465 XInventoryFolder[] folders = m_Database.GetFolders( 465 XInventoryFolder[] folders = m_Database.GetFolders(
466 new string[] { "agentID", "type" }, 466 new string[] { "agentID", "type" },
467 new string[] { principalID.ToString(), "100" }); // This is a special folder type... 467 new string[] { principalID.ToString(), InventoryItemBase.SUITCASE_FOLDER_TYPE.ToString() }); // This is a special folder type...
468 468
469 if (folders != null && folders.Length > 0) 469 if (folders != null && folders.Length > 0)
470 return folders[0]; 470 return folders[0];
@@ -472,13 +472,13 @@ namespace OpenSim.Services.HypergridService
472 // check to see if we have the old Suitcase folder 472 // check to see if we have the old Suitcase folder
473 folders = m_Database.GetFolders( 473 folders = m_Database.GetFolders(
474 new string[] { "agentID", "folderName", "parentFolderID" }, 474 new string[] { "agentID", "folderName", "parentFolderID" },
475 new string[] { principalID.ToString(), "My Suitcase", UUID.Zero.ToString() }); 475 new string[] { principalID.ToString(), InventoryItemBase.SUITCASE_FOLDER_NAME, UUID.Zero.ToString() });
476 if (folders != null && folders.Length > 0) 476 if (folders != null && folders.Length > 0)
477 { 477 {
478 // Move it to under the root folder 478 // Move it to under the root folder
479 XInventoryFolder root = GetRootXFolder(principalID); 479 XInventoryFolder root = GetRootXFolder(principalID);
480 folders[0].parentFolderID = root.folderID; 480 folders[0].parentFolderID = root.folderID;
481 folders[0].type = 100; 481 folders[0].type = InventoryItemBase.SUITCASE_FOLDER_TYPE;
482 m_Database.StoreFolder(folders[0]); 482 m_Database.StoreFolder(folders[0]);
483 return folders[0]; 483 return folders[0];
484 } 484 }
@@ -488,7 +488,7 @@ namespace OpenSim.Services.HypergridService
488 488
489 private void SetAsNormalFolder(XInventoryFolder suitcase) 489 private void SetAsNormalFolder(XInventoryFolder suitcase)
490 { 490 {
491 suitcase.type = (short)AssetType.Folder; 491 suitcase.type = InventoryItemBase.SUITCASE_FOLDER_FAKE_TYPE;
492 } 492 }
493 493
494 private List<XInventoryFolder> GetFolderTree(UUID principalID, UUID folder) 494 private List<XInventoryFolder> GetFolderTree(UUID principalID, UUID folder)
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 3bee433..7c16ca9 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -631,8 +631,8 @@ namespace OpenSim.Services.InventoryService
631 newFolder.ParentID = folder.parentFolderID; 631 newFolder.ParentID = folder.parentFolderID;
632 newFolder.Type = (short)folder.type; 632 newFolder.Type = (short)folder.type;
633 // Viewer can't understand anything that's not in it's LLFolderType enum 633 // Viewer can't understand anything that's not in it's LLFolderType enum
634 if (newFolder.Type == 100) 634 if (newFolder.Type == InventoryItemBase.SUITCASE_FOLDER_TYPE)
635 newFolder.Type = -1; 635 newFolder.Type = InventoryItemBase.SUITCASE_FOLDER_FAKE_TYPE;
636 newFolder.Version = (ushort)folder.version; 636 newFolder.Version = (ushort)folder.version;
637 newFolder.Name = folder.folderName; 637 newFolder.Name = folder.folderName;
638 newFolder.Owner = folder.agentID; 638 newFolder.Owner = folder.agentID;