aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
authorMelanie2012-04-07 04:52:14 +0100
committerMelanie2012-04-07 04:52:14 +0100
commitb39de2425cac4c2a94a7fdd6c77100ef831d66b4 (patch)
tree9258928681a82d68b408354e534c32bcf283ad3a /OpenSim/Services/Connectors
parentMerge branch 'ubitwork' (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.zip
opensim-SC_OLD-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.gz
opensim-SC_OLD-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.bz2
opensim-SC_OLD-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs OpenSim/Region/CoreModules/World/Land/LandObject.cs OpenSim/Region/Framework/Scenes/Scene.Inventory.cs OpenSim/Region/Framework/Scenes/SceneObjectPart.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs47
1 files changed, 39 insertions, 8 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
index 39e983b..9d96703 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
@@ -111,19 +111,21 @@ namespace OpenSim.Services.Connectors
111 if (ret.Count == 0) 111 if (ret.Count == 0)
112 return null; 112 return null;
113 113
114 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 114 Dictionary<string, object> folders = (Dictionary<string, object>)ret["FOLDERS"];
115
116 List<InventoryFolderBase> fldrs = new List<InventoryFolderBase>();
115 117
116 try 118 try
117 { 119 {
118 foreach (Object o in ret.Values) 120 foreach (Object o in folders.Values)
119 folders.Add(BuildFolder((Dictionary<string, object>)o)); 121 fldrs.Add(BuildFolder((Dictionary<string, object>)o));
120 } 122 }
121 catch (Exception e) 123 catch (Exception e)
122 { 124 {
123 m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception unwrapping folder list: {0}", e.Message); 125 m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception unwrapping folder list: {0}", e.Message);
124 } 126 }
125 127
126 return folders; 128 return fldrs;
127 } 129 }
128 130
129 public InventoryFolderBase GetRootFolder(UUID principalID) 131 public InventoryFolderBase GetRootFolder(UUID principalID)
@@ -492,12 +494,41 @@ namespace OpenSim.Services.Connectors
492 return int.Parse(ret["RESULT"].ToString()); 494 return int.Parse(ret["RESULT"].ToString());
493 } 495 }
494 496
495
496 // These are either obsolete or unused
497 //
498 public InventoryCollection GetUserInventory(UUID principalID) 497 public InventoryCollection GetUserInventory(UUID principalID)
499 { 498 {
500 return null; 499 InventoryCollection inventory = new InventoryCollection();
500 inventory.Folders = new List<InventoryFolderBase>();
501 inventory.Items = new List<InventoryItemBase>();
502 inventory.UserID = principalID;
503
504 try
505 {
506 Dictionary<string, object> ret = MakeRequest("GETUSERINVENTORY",
507 new Dictionary<string, object> {
508 { "PRINCIPAL", principalID.ToString() }
509 });
510
511 if (ret == null)
512 return null;
513 if (ret.Count == 0)
514 return null;
515
516 Dictionary<string, object> folders =
517 (Dictionary<string, object>)ret["FOLDERS"];
518 Dictionary<string, object> items =
519 (Dictionary<string, object>)ret["ITEMS"];
520
521 foreach (Object o in folders.Values) // getting the values directly, we don't care about the keys folder_i
522 inventory.Folders.Add(BuildFolder((Dictionary<string, object>)o));
523 foreach (Object o in items.Values) // getting the values directly, we don't care about the keys item_i
524 inventory.Items.Add(BuildItem((Dictionary<string, object>)o));
525 }
526 catch (Exception e)
527 {
528 m_log.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception in GetUserInventory: {0}", e.Message);
529 }
530
531 return inventory;
501 } 532 }
502 533
503 public void GetUserInventory(UUID principalID, InventoryReceiptCallback callback) 534 public void GetUserInventory(UUID principalID, InventoryReceiptCallback callback)