aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/InventoryServer/GridInventoryService.cs
diff options
context:
space:
mode:
authorJeff Ames2008-05-16 01:22:11 +0000
committerJeff Ames2008-05-16 01:22:11 +0000
commit65c5efe43b68700bad94076d4cd421160203c5de (patch)
tree589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Grid/InventoryServer/GridInventoryService.cs
parentThank you very much, mjm for : (diff)
downloadopensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Grid/InventoryServer/GridInventoryService.cs')
-rw-r--r--OpenSim/Grid/InventoryServer/GridInventoryService.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index 80f0c5e..5388263 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Grid.InventoryServer
43 /// </summary> 43 /// </summary>
44 public class GridInventoryService : InventoryServiceBase 44 public class GridInventoryService : InventoryServiceBase
45 { 45 {
46 private static readonly ILog m_log 46 private static readonly ILog m_log
47 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) 49 public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback)
@@ -56,31 +56,31 @@ namespace OpenSim.Grid.InventoryServer
56 /// <param name="rawUserID"></param> 56 /// <param name="rawUserID"></param>
57 /// <returns>The user's inventory. If an inventory cannot be found then an empty collection is returned.</returns> 57 /// <returns>The user's inventory. If an inventory cannot be found then an empty collection is returned.</returns>
58 public InventoryCollection GetUserInventory(Guid rawUserID) 58 public InventoryCollection GetUserInventory(Guid rawUserID)
59 { 59 {
60 LLUUID userID = new LLUUID(rawUserID); 60 LLUUID userID = new LLUUID(rawUserID);
61 61
62 m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID); 62 m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID);
63 63
64 // Uncomment me to simulate a slow responding inventory server 64 // Uncomment me to simulate a slow responding inventory server
65 //Thread.Sleep(16000); 65 //Thread.Sleep(16000);
66 66
67 InventoryCollection invCollection = new InventoryCollection(); 67 InventoryCollection invCollection = new InventoryCollection();
68 68
69 List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID); 69 List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID);
70 70
71 if (null == allFolders) 71 if (null == allFolders)
72 { 72 {
73 m_log.WarnFormat("[GRID AGENT INVENTORY]: No inventory found for user {0}", rawUserID); 73 m_log.WarnFormat("[GRID AGENT INVENTORY]: No inventory found for user {0}", rawUserID);
74 74
75 return invCollection; 75 return invCollection;
76 } 76 }
77 77
78 List<InventoryItemBase> allItems = new List<InventoryItemBase>(); 78 List<InventoryItemBase> allItems = new List<InventoryItemBase>();
79 79
80 foreach (InventoryFolderBase folder in allFolders) 80 foreach (InventoryFolderBase folder in allFolders)
81 { 81 {
82 List<InventoryItemBase> items = RequestFolderItems(folder.ID); 82 List<InventoryItemBase> items = RequestFolderItems(folder.ID);
83 83
84 if (items != null) 84 if (items != null)
85 { 85 {
86 allItems.InsertRange(0, items); 86 allItems.InsertRange(0, items);
@@ -88,36 +88,36 @@ namespace OpenSim.Grid.InventoryServer
88 } 88 }
89 89
90 invCollection.UserID = userID; 90 invCollection.UserID = userID;
91 invCollection.Folders = allFolders; 91 invCollection.Folders = allFolders;
92 invCollection.Items = allItems; 92 invCollection.Items = allItems;
93 93
94// foreach (InventoryFolderBase folder in invCollection.Folders) 94// foreach (InventoryFolderBase folder in invCollection.Folders)
95// { 95// {
96// m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID); 96// m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID);
97// } 97// }
98// 98//
99// foreach (InventoryItemBase item in invCollection.Items) 99// foreach (InventoryItemBase item in invCollection.Items)
100// { 100// {
101// m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); 101// m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder);
102// } 102// }
103 103
104 m_log.InfoFormat( 104 m_log.InfoFormat(
105 "[GRID AGENT INVENTORY]: Sending back inventory response to user {0} containing {1} folders and {2} items", 105 "[GRID AGENT INVENTORY]: Sending back inventory response to user {0} containing {1} folders and {2} items",
106 invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); 106 invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count);
107 107
108 return invCollection; 108 return invCollection;
109 } 109 }
110 110
111 /// <summary> 111 /// <summary>
112 /// Guid to UUID wrapper for same name IInventoryServices method 112 /// Guid to UUID wrapper for same name IInventoryServices method
113 /// </summary> 113 /// </summary>
114 /// <param name="rawUserID"></param> 114 /// <param name="rawUserID"></param>
115 /// <returns></returns> 115 /// <returns></returns>
116 public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID) 116 public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID)
117 { 117 {
118 LLUUID userID = new LLUUID(rawUserID); 118 LLUUID userID = new LLUUID(rawUserID);
119 return GetInventorySkeleton(userID); 119 return GetInventorySkeleton(userID);
120 } 120 }
121 121
122 /// <summary> 122 /// <summary>
123 /// Create an inventory for the given user. 123 /// Create an inventory for the given user.