aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Services/HGInventoryService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Services/HGInventoryService.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Services/HGInventoryService.cs b/OpenSim/Framework/Communications/Services/HGInventoryService.cs
index abb9b92..a3234bf 100644
--- a/OpenSim/Framework/Communications/Services/HGInventoryService.cs
+++ b/OpenSim/Framework/Communications/Services/HGInventoryService.cs
@@ -107,6 +107,17 @@ namespace OpenSim.Framework.Communications.Services
107 public virtual void AddHttpHandlers() 107 public virtual void AddHttpHandlers()
108 { 108 {
109 httpServer.AddHTTPHandler("/InvCap/", CapHandler); 109 httpServer.AddHTTPHandler("/InvCap/", CapHandler);
110
111 // Un-cap'ed for now
112 httpServer.AddStreamHandler(new RestDeserialiseSecureHandler<Guid, InventoryItemBase>(
113 "POST", "/GetItem/", GetInventoryItem, CheckAuthSession));
114
115 }
116
117 public InventoryItemBase GetInventoryItem(Guid id)
118 {
119 UUID itemID = new UUID(id);
120 return m_inventoryService.GetInventoryItem(itemID);
110 } 121 }
111 122
112 public bool CheckAuthSession(string session_id, string avatar_id) 123 public bool CheckAuthSession(string session_id, string avatar_id)
@@ -353,10 +364,15 @@ namespace OpenSim.Framework.Communications.Services
353 m_log.DebugFormat("[HGStandaloneInvService]: client with uuid {0} is trying to get an item of owner {1}", item.Owner, item2.Owner); 364 m_log.DebugFormat("[HGStandaloneInvService]: client with uuid {0} is trying to get an item of owner {1}", item.Owner, item2.Owner);
354 return asset; 365 return asset;
355 } 366 }
367 UUID assetID = item2.AssetID;
368 if (assetID != item.AssetID)
369 {
370 m_log.WarnFormat("[HGStandaloneInvService]: asset IDs don't match {0}, {1}", item.AssetID, item2.AssetID);
371 }
356 372
357 // All good, get the asset 373 // All good, get the asset
358 //AssetBase theasset = m_assetProvider.FetchAsset(item.AssetID); 374 //AssetBase theasset = m_assetProvider.FetchAsset(item.AssetID);
359 AssetBase theasset = FetchAsset(item.AssetID, (item.InvType == (int)InventoryType.Texture)); 375 AssetBase theasset = FetchAsset(assetID, (item.InvType == (int)InventoryType.Texture));
360 376
361 m_log.Debug("[HGStandaloneInvService] Found asset " + ((theasset == null) ? "NULL" : "Not Null")); 377 m_log.Debug("[HGStandaloneInvService] Found asset " + ((theasset == null) ? "NULL" : "Not Null"));
362 if (theasset != null) 378 if (theasset != null)