aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2010-04-27 11:01:56 -0700
committerDiva Canto2010-04-27 11:01:56 -0700
commit3f9d38538e4d7f238eb901aced60de7e6673a92e (patch)
tree2ff4ce69134ba8983d515ad8e4f42d4c6b6337b2
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-3f9d38538e4d7f238eb901aced60de7e6673a92e.zip
opensim-SC_OLD-3f9d38538e4d7f238eb901aced60de7e6673a92e.tar.gz
opensim-SC_OLD-3f9d38538e4d7f238eb901aced60de7e6673a92e.tar.bz2
opensim-SC_OLD-3f9d38538e4d7f238eb901aced60de7e6673a92e.tar.xz
XInventory connector/handler showing signs of life. Tested, but needs more testing.
-rw-r--r--OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml1
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs69
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs128
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs8
5 files changed, 139 insertions, 69 deletions
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index aaa318c..0a5ff3f 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -45,6 +45,7 @@
45 <RegionModule id="HGAssetBroker" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker" /> 45 <RegionModule id="HGAssetBroker" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker" />
46 <RegionModule id="LocalInventoryServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.LocalInventoryServicesConnector" /> 46 <RegionModule id="LocalInventoryServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.LocalInventoryServicesConnector" />
47 <RegionModule id="RemoteInventoryServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.RemoteInventoryServicesConnector" /> 47 <RegionModule id="RemoteInventoryServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.RemoteInventoryServicesConnector" />
48 <RegionModule id="RemoteXInventoryServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.RemoteXInventoryServicesConnector" />
48 <RegionModule id="HGInventoryBroker" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.HGInventoryBroker" /> 49 <RegionModule id="HGInventoryBroker" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.HGInventoryBroker" />
49 <RegionModule id="LocalNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.LocalNeighbourServicesConnector" /> 50 <RegionModule id="LocalNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.LocalNeighbourServicesConnector" />
50 <RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" /> 51 <RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" />
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
index fb353c2..8504b67 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
@@ -183,6 +183,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
183 183
184 public override InventoryCollection GetFolderContent(UUID userID, UUID folderID) 184 public override InventoryCollection GetFolderContent(UUID userID, UUID folderID)
185 { 185 {
186 m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolderContent {0}", folderID);
186 try 187 try
187 { 188 {
188 return m_RemoteConnector.GetFolderContent(userID, folderID); 189 return m_RemoteConnector.GetFolderContent(userID, folderID);
@@ -295,6 +296,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
295 296
296 public override InventoryFolderBase GetFolder(InventoryFolderBase folder) 297 public override InventoryFolderBase GetFolder(InventoryFolderBase folder)
297 { 298 {
299 m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID);
298 if (folder == null) 300 if (folder == null)
299 return null; 301 return null;
300 302
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 7164520..c95b4d4 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -228,9 +228,17 @@ namespace OpenSim.Server.Handlers.Asset
228 228
229 List<InventoryFolderBase> folders = m_InventoryService.GetInventorySkeleton(new UUID(request["PRINCIPAL"].ToString())); 229 List<InventoryFolderBase> folders = m_InventoryService.GetInventorySkeleton(new UUID(request["PRINCIPAL"].ToString()));
230 230
231 Dictionary<string, object> sfolders = new Dictionary<string, object>();
231 if (folders != null) 232 if (folders != null)
233 {
234 int i = 0;
232 foreach (InventoryFolderBase f in folders) 235 foreach (InventoryFolderBase f in folders)
233 result[f.ID.ToString()] = EncodeFolder(f); 236 {
237 sfolders["folder_" + i.ToString()] = EncodeFolder(f);
238 i++;
239 }
240 }
241 result["FOLDERS"] = sfolders;
234 242
235 string xmlString = ServerUtils.BuildXmlResponse(result); 243 string xmlString = ServerUtils.BuildXmlResponse(result);
236 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 244 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -246,7 +254,7 @@ namespace OpenSim.Server.Handlers.Asset
246 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); 254 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
247 InventoryFolderBase rfolder = m_InventoryService.GetRootFolder(principal); 255 InventoryFolderBase rfolder = m_InventoryService.GetRootFolder(principal);
248 if (rfolder != null) 256 if (rfolder != null)
249 result[rfolder.ID.ToString()] = EncodeFolder(rfolder); 257 result["folder"] = EncodeFolder(rfolder);
250 258
251 string xmlString = ServerUtils.BuildXmlResponse(result); 259 string xmlString = ServerUtils.BuildXmlResponse(result);
252 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 260 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -263,7 +271,7 @@ namespace OpenSim.Server.Handlers.Asset
263 Int32.TryParse(request["TYPE"].ToString(), out type); 271 Int32.TryParse(request["TYPE"].ToString(), out type);
264 InventoryFolderBase folder = m_InventoryService.GetFolderForType(principal, (AssetType)type); 272 InventoryFolderBase folder = m_InventoryService.GetFolderForType(principal, (AssetType)type);
265 if (folder != null) 273 if (folder != null)
266 result[folder.ID.ToString()] = EncodeFolder(folder); 274 result["folder"] = EncodeFolder(folder);
267 275
268 string xmlString = ServerUtils.BuildXmlResponse(result); 276 string xmlString = ServerUtils.BuildXmlResponse(result);
269 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 277 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -283,13 +291,21 @@ namespace OpenSim.Server.Handlers.Asset
283 if (icoll != null) 291 if (icoll != null)
284 { 292 {
285 Dictionary<string, object> folders = new Dictionary<string, object>(); 293 Dictionary<string, object> folders = new Dictionary<string, object>();
294 int i = 0;
286 foreach (InventoryFolderBase f in icoll.Folders) 295 foreach (InventoryFolderBase f in icoll.Folders)
287 folders[f.ID.ToString()] = EncodeFolder(f); 296 {
297 folders["folder_" + i.ToString()] = EncodeFolder(f);
298 i++;
299 }
288 result["FOLDERS"] = folders; 300 result["FOLDERS"] = folders;
289 301
302 i = 0;
290 Dictionary<string, object> items = new Dictionary<string, object>(); 303 Dictionary<string, object> items = new Dictionary<string, object>();
291 foreach (InventoryItemBase i in icoll.Items) 304 foreach (InventoryItemBase it in icoll.Items)
292 items[i.ID.ToString()] = EncodeItem(i); 305 {
306 items["item_" + i.ToString()] = EncodeItem(it);
307 i++;
308 }
293 result["ITEMS"] = items; 309 result["ITEMS"] = items;
294 } 310 }
295 311
@@ -308,9 +324,18 @@ namespace OpenSim.Server.Handlers.Asset
308 UUID.TryParse(request["FOLDER"].ToString(), out folderID); 324 UUID.TryParse(request["FOLDER"].ToString(), out folderID);
309 325
310 List<InventoryItemBase> items = m_InventoryService.GetFolderItems(principal, folderID); 326 List<InventoryItemBase> items = m_InventoryService.GetFolderItems(principal, folderID);
327 Dictionary<string, object> sitems = new Dictionary<string, object>();
328
311 if (items != null) 329 if (items != null)
330 {
331 int i = 0;
312 foreach (InventoryItemBase item in items) 332 foreach (InventoryItemBase item in items)
313 result[item.ID.ToString()] = EncodeItem(item); 333 {
334 sitems["item_" + i.ToString()] = EncodeItem(item);
335 i++;
336 }
337 }
338 result["ITEMS"] = sitems;
314 339
315 string xmlString = ServerUtils.BuildXmlResponse(result); 340 string xmlString = ServerUtils.BuildXmlResponse(result);
316 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 341 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -483,7 +508,7 @@ namespace OpenSim.Server.Handlers.Asset
483 InventoryItemBase item = new InventoryItemBase(id); 508 InventoryItemBase item = new InventoryItemBase(id);
484 item = m_InventoryService.GetItem(item); 509 item = m_InventoryService.GetItem(item);
485 if (item != null) 510 if (item != null)
486 result[item.ID.ToString()] = EncodeItem(item); 511 result["item"] = EncodeItem(item);
487 512
488 string xmlString = ServerUtils.BuildXmlResponse(result); 513 string xmlString = ServerUtils.BuildXmlResponse(result);
489 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 514 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -500,7 +525,7 @@ namespace OpenSim.Server.Handlers.Asset
500 InventoryFolderBase folder = new InventoryFolderBase(id); 525 InventoryFolderBase folder = new InventoryFolderBase(id);
501 folder = m_InventoryService.GetFolder(folder); 526 folder = m_InventoryService.GetFolder(folder);
502 if (folder != null) 527 if (folder != null)
503 result[folder.ID.ToString()] = EncodeFolder(folder); 528 result["folder"] = EncodeFolder(folder);
504 529
505 string xmlString = ServerUtils.BuildXmlResponse(result); 530 string xmlString = ServerUtils.BuildXmlResponse(result);
506 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 531 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -515,9 +540,17 @@ namespace OpenSim.Server.Handlers.Asset
515 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); 540 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
516 541
517 List<InventoryItemBase> gestures = m_InventoryService.GetActiveGestures(principal); 542 List<InventoryItemBase> gestures = m_InventoryService.GetActiveGestures(principal);
543 Dictionary<string, object> items = new Dictionary<string, object>();
518 if (gestures != null) 544 if (gestures != null)
545 {
546 int i = 0;
519 foreach (InventoryItemBase item in gestures) 547 foreach (InventoryItemBase item in gestures)
520 result[item.ID.ToString()] = EncodeItem(item); 548 {
549 items["item_" + i.ToString()] = EncodeItem(item);
550 i++;
551 }
552 }
553 result["ITEMS"] = items;
521 554
522 string xmlString = ServerUtils.BuildXmlResponse(result); 555 string xmlString = ServerUtils.BuildXmlResponse(result);
523 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 556 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -549,10 +582,16 @@ namespace OpenSim.Server.Handlers.Asset
549 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); 582 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
550 583
551 Dictionary<AssetType, InventoryFolderBase> sfolders = GetSystemFolders(principal); 584 Dictionary<AssetType, InventoryFolderBase> sfolders = GetSystemFolders(principal);
585 m_log.DebugFormat("[XXX]: SystemFolders got {0} folders", sfolders.Count);
552 586
553 if (sfolders != null) 587 Dictionary<string, object> folders = new Dictionary<string, object>();
554 foreach (KeyValuePair<AssetType, InventoryFolderBase> kvp in sfolders) 588 int i = 0;
555 result[kvp.Key.ToString()] = EncodeFolder(kvp.Value); 589 foreach (KeyValuePair<AssetType, InventoryFolderBase> kvp in sfolders)
590 {
591 folders["folder_" + i.ToString()] = EncodeFolder(kvp.Value);
592 i++;
593 }
594 result["FOLDERS"] = folders;
556 595
557 string xmlString = ServerUtils.BuildXmlResponse(result); 596 string xmlString = ServerUtils.BuildXmlResponse(result);
558 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 597 m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -589,7 +628,7 @@ namespace OpenSim.Server.Handlers.Asset
589 ret["Flags"] = item.Flags.ToString(); 628 ret["Flags"] = item.Flags.ToString();
590 ret["Folder"] = item.Folder.ToString(); 629 ret["Folder"] = item.Folder.ToString();
591 ret["GroupID"] = item.GroupID.ToString(); 630 ret["GroupID"] = item.GroupID.ToString();
592 ret["GroupedOwned"] = item.GroupOwned.ToString(); 631 ret["GroupOwned"] = item.GroupOwned.ToString();
593 ret["GroupPermissions"] = item.GroupPermissions.ToString(); 632 ret["GroupPermissions"] = item.GroupPermissions.ToString();
594 ret["ID"] = item.ID.ToString(); 633 ret["ID"] = item.ID.ToString();
595 ret["InvType"] = item.InvType.ToString(); 634 ret["InvType"] = item.InvType.ToString();
@@ -664,7 +703,7 @@ namespace OpenSim.Server.Handlers.Asset
664 return folders; 703 return folders;
665 } 704 }
666 } 705 }
667 m_log.WarnFormat("[INVENTORY SERVICE]: System folders for {0} not found", userID); 706 m_log.WarnFormat("[XINVENTORY SERVICE]: System folders for {0} not found", userID);
668 return new Dictionary<AssetType, InventoryFolderBase>(); 707 return new Dictionary<AssetType, InventoryFolderBase>();
669 } 708 }
670 #endregion 709 #endregion
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
index edf224f..52294da 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
@@ -112,8 +112,15 @@ namespace OpenSim.Services.Connectors
112 112
113 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 113 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
114 114
115 foreach (Object o in ret.Values) 115 try
116 folders.Add(BuildFolder((Dictionary<string,object>)o)); 116 {
117 foreach (Object o in ret.Values)
118 folders.Add(BuildFolder((Dictionary<string, object>)o));
119 }
120 catch (Exception e)
121 {
122 m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception unwrapping folder list: {0}", e.Message);
123 }
117 124
118 return folders; 125 return folders;
119 } 126 }
@@ -130,7 +137,7 @@ namespace OpenSim.Services.Connectors
130 if (ret.Count == 0) 137 if (ret.Count == 0)
131 return null; 138 return null;
132 139
133 return BuildFolder(ret); 140 return BuildFolder((Dictionary<string, object>)ret["folder"]);
134 } 141 }
135 142
136 public InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) 143 public InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
@@ -146,7 +153,7 @@ namespace OpenSim.Services.Connectors
146 if (ret.Count == 0) 153 if (ret.Count == 0)
147 return null; 154 return null;
148 155
149 return BuildFolder(ret); 156 return BuildFolder((Dictionary<string, object>)ret["folder"]);
150 } 157 }
151 158
152 public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) 159 public InventoryCollection GetFolderContent(UUID principalID, UUID folderID)
@@ -173,10 +180,17 @@ namespace OpenSim.Services.Connectors
173 Dictionary<string,object> items = 180 Dictionary<string,object> items =
174 (Dictionary<string,object>)ret["ITEMS"]; 181 (Dictionary<string,object>)ret["ITEMS"];
175 182
176 foreach (Object o in folders.Values) 183 try
177 inventory.Folders.Add(BuildFolder((Dictionary<string,object>)o)); 184 {
178 foreach (Object o in items.Values) 185 foreach (Object o in folders.Values) // getting the values directly, we don't care about the keys folder_i
179 inventory.Items.Add(BuildItem((Dictionary<string,object>)o)); 186 inventory.Folders.Add(BuildFolder((Dictionary<string, object>)o));
187 foreach (Object o in items.Values) // getting the values directly, we don't care about the keys item_i
188 inventory.Items.Add(BuildItem((Dictionary<string, object>)o));
189 }
190 catch (Exception e)
191 {
192 m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception unwrapping content list: {0}", e.Message);
193 }
180 194
181 return inventory; 195 return inventory;
182 } 196 }
@@ -194,13 +208,12 @@ namespace OpenSim.Services.Connectors
194 if (ret.Count == 0) 208 if (ret.Count == 0)
195 return null; 209 return null;
196 210
197 211 Dictionary<string, object> items = (Dictionary<string, object>)ret["ITEMS"];
198 List<InventoryItemBase> items = new List<InventoryItemBase>(); 212 List<InventoryItemBase> fitems = new List<InventoryItemBase>();
199 213 foreach (Object o in items.Values) // getting the values directly, we don't care about the keys item_i
200 foreach (Object o in ret.Values) 214 fitems.Add(BuildItem((Dictionary<string, object>)o));
201 items.Add(BuildItem((Dictionary<string,object>)o));
202 215
203 return items; 216 return fitems;
204 } 217 }
205 218
206 public bool AddFolder(InventoryFolderBase folder) 219 public bool AddFolder(InventoryFolderBase folder)
@@ -405,7 +418,7 @@ namespace OpenSim.Services.Connectors
405 if (ret.Count == 0) 418 if (ret.Count == 0)
406 return null; 419 return null;
407 420
408 return BuildItem(ret); 421 return BuildItem((Dictionary<string, object>)ret["item"]);
409 } 422 }
410 423
411 public InventoryFolderBase GetFolder(InventoryFolderBase folder) 424 public InventoryFolderBase GetFolder(InventoryFolderBase folder)
@@ -420,7 +433,7 @@ namespace OpenSim.Services.Connectors
420 if (ret.Count == 0) 433 if (ret.Count == 0)
421 return null; 434 return null;
422 435
423 return BuildFolder(ret); 436 return BuildFolder((Dictionary<string, object>)ret["folder"]);
424 } 437 }
425 438
426 public List<InventoryItemBase> GetActiveGestures(UUID principalID) 439 public List<InventoryItemBase> GetActiveGestures(UUID principalID)
@@ -435,8 +448,8 @@ namespace OpenSim.Services.Connectors
435 448
436 List<InventoryItemBase> items = new List<InventoryItemBase>(); 449 List<InventoryItemBase> items = new List<InventoryItemBase>();
437 450
438 foreach (Object o in ret.Values) 451 foreach (Object o in ret.Values) // getting the values directly, we don't care about the keys item_i
439 items.Add(BuildItem((Dictionary<string,object>)o)); 452 items.Add(BuildItem((Dictionary<string, object>)o));
440 453
441 return items; 454 return items;
442 } 455 }
@@ -469,13 +482,14 @@ namespace OpenSim.Services.Connectors
469 482
470 try 483 try
471 { 484 {
472 foreach (KeyValuePair<string, object> kvp in ret) 485 Dictionary<string, object> folders = (Dictionary<string, object>)ret["FOLDERS"];
486
487 foreach (Object o in folders.Values) // getting the values directly, we don't care about the keys folder_i
473 { 488 {
474 InventoryFolderBase folder = BuildFolder((Dictionary<string, object>)(kvp.Value)); 489 InventoryFolderBase folder = BuildFolder((Dictionary<string, object>)o);
475 short type = 0; 490 sfolders.Add((AssetType)folder.Type, folder);
476 if (Int16.TryParse(kvp.Key, out type))
477 sfolders.Add((AssetType)type, folder);
478 } 491 }
492
479 } 493 }
480 catch (Exception e) 494 catch (Exception e)
481 { 495 {
@@ -522,13 +536,20 @@ namespace OpenSim.Services.Connectors
522 { 536 {
523 InventoryFolderBase folder = new InventoryFolderBase(); 537 InventoryFolderBase folder = new InventoryFolderBase();
524 538
525 folder.ParentID = new UUID(data["ParentID"].ToString()); 539 try
526 folder.Type = short.Parse(data["Type"].ToString()); 540 {
527 folder.Version = ushort.Parse(data["Version"].ToString()); 541 folder.ParentID = new UUID(data["ParentID"].ToString());
528 folder.Name = data["Name"].ToString(); 542 folder.Type = short.Parse(data["Type"].ToString());
529 folder.Owner = new UUID(data["Owner"].ToString()); 543 folder.Version = ushort.Parse(data["Version"].ToString());
530 folder.ID = new UUID(data["ID"].ToString()); 544 folder.Name = data["Name"].ToString();
531 545 folder.Owner = new UUID(data["Owner"].ToString());
546 folder.ID = new UUID(data["ID"].ToString());
547 }
548 catch (Exception e)
549 {
550 m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception building folder: {0}", e.Message);
551 }
552
532 return folder; 553 return folder;
533 } 554 }
534 555
@@ -536,26 +557,33 @@ namespace OpenSim.Services.Connectors
536 { 557 {
537 InventoryItemBase item = new InventoryItemBase(); 558 InventoryItemBase item = new InventoryItemBase();
538 559
539 item.AssetID = new UUID(data["AssetID"].ToString()); 560 try
540 item.AssetType = int.Parse(data["AssetType"].ToString()); 561 {
541 item.Name = data["Name"].ToString(); 562 item.AssetID = new UUID(data["AssetID"].ToString());
542 item.Owner = new UUID(data["Owner"].ToString()); 563 item.AssetType = int.Parse(data["AssetType"].ToString());
543 item.ID = new UUID(data["ID"].ToString()); 564 item.Name = data["Name"].ToString();
544 item.InvType = int.Parse(data["InvType"].ToString()); 565 item.Owner = new UUID(data["Owner"].ToString());
545 item.Folder = new UUID(data["Folder"].ToString()); 566 item.ID = new UUID(data["ID"].ToString());
546 item.CreatorId = data["CreatorId"].ToString(); 567 item.InvType = int.Parse(data["InvType"].ToString());
547 item.Description = data["Description"].ToString(); 568 item.Folder = new UUID(data["Folder"].ToString());
548 item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); 569 item.CreatorId = data["CreatorId"].ToString();
549 item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); 570 item.Description = data["Description"].ToString();
550 item.BasePermissions = uint.Parse(data["BasePermissions"].ToString()); 571 item.NextPermissions = uint.Parse(data["NextPermissions"].ToString());
551 item.EveryOnePermissions = uint.Parse(data["EveryOnePermissions"].ToString()); 572 item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString());
552 item.GroupPermissions = uint.Parse(data["GroupPermissions"].ToString()); 573 item.BasePermissions = uint.Parse(data["BasePermissions"].ToString());
553 item.GroupID = new UUID(data["GroupID"].ToString()); 574 item.EveryOnePermissions = uint.Parse(data["EveryOnePermissions"].ToString());
554 item.GroupOwned = bool.Parse(data["GroupOwned"].ToString()); 575 item.GroupPermissions = uint.Parse(data["GroupPermissions"].ToString());
555 item.SalePrice = int.Parse(data["SalePrice"].ToString()); 576 item.GroupID = new UUID(data["GroupID"].ToString());
556 item.SaleType = byte.Parse(data["SaleType"].ToString()); 577 item.GroupOwned = bool.Parse(data["GroupOwned"].ToString());
557 item.Flags = uint.Parse(data["Flags"].ToString()); 578 item.SalePrice = int.Parse(data["SalePrice"].ToString());
558 item.CreationDate = int.Parse(data["CreationDate"].ToString()); 579 item.SaleType = byte.Parse(data["SaleType"].ToString());
580 item.Flags = uint.Parse(data["Flags"].ToString());
581 item.CreationDate = int.Parse(data["CreationDate"].ToString());
582 }
583 catch (Exception e)
584 {
585 m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception building item: {0}", e.Message);
586 }
559 587
560 return item; 588 return item;
561 } 589 }
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index bbd37d1..1409a01 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -184,7 +184,7 @@ namespace OpenSim.Services.InventoryService
184 184
185 foreach (XInventoryFolder x in allFolders) 185 foreach (XInventoryFolder x in allFolders)
186 { 186 {
187 m_log.DebugFormat("[INVENTORY]: Adding folder {0} to skeleton", x.folderName); 187 m_log.DebugFormat("[XINVENTORY]: Adding folder {0} to skeleton", x.folderName);
188 folders.Add(ConvertToOpenSim(x)); 188 folders.Add(ConvertToOpenSim(x));
189 } 189 }
190 190
@@ -221,7 +221,7 @@ namespace OpenSim.Services.InventoryService
221 // connector. So we disregard the principal and look 221 // connector. So we disregard the principal and look
222 // by ID. 222 // by ID.
223 // 223 //
224 m_log.DebugFormat("[INVENTORY]: Fetch contents for folder {0}", folderID.ToString()); 224 m_log.DebugFormat("[XINVENTORY]: Fetch contents for folder {0}", folderID.ToString());
225 InventoryCollection inventory = new InventoryCollection(); 225 InventoryCollection inventory = new InventoryCollection();
226 inventory.UserID = principalID; 226 inventory.UserID = principalID;
227 inventory.Folders = new List<InventoryFolderBase>(); 227 inventory.Folders = new List<InventoryFolderBase>();
@@ -233,7 +233,7 @@ namespace OpenSim.Services.InventoryService
233 233
234 foreach (XInventoryFolder x in folders) 234 foreach (XInventoryFolder x in folders)
235 { 235 {
236 m_log.DebugFormat("[INVENTORY]: Adding folder {0} to response", x.folderName); 236 m_log.DebugFormat("[XINVENTORY]: Adding folder {0} to response", x.folderName);
237 inventory.Folders.Add(ConvertToOpenSim(x)); 237 inventory.Folders.Add(ConvertToOpenSim(x));
238 } 238 }
239 239
@@ -243,7 +243,7 @@ namespace OpenSim.Services.InventoryService
243 243
244 foreach (XInventoryItem i in items) 244 foreach (XInventoryItem i in items)
245 { 245 {
246 m_log.DebugFormat("[INVENTORY]: Adding item {0} to response", i.inventoryName); 246 m_log.DebugFormat("[XINVENTORY]: Adding item {0} to response", i.inventoryName);
247 inventory.Items.Add(ConvertToOpenSim(i)); 247 inventory.Items.Add(ConvertToOpenSim(i));
248 } 248 }
249 249