aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Services
diff options
context:
space:
mode:
authordiva2009-04-05 03:27:50 +0000
committerdiva2009-04-05 03:27:50 +0000
commit3c9cba162739b93a07067d8a286f6dad55e02217 (patch)
treec4f9054f524b002b37e4d36a382c206b028f25d9 /OpenSim/Framework/Communications/Services
parent* Fixed copyright headers on HyperGrid source files. (Now match the rest of O... (diff)
downloadopensim-SC-3c9cba162739b93a07067d8a286f6dad55e02217.zip
opensim-SC-3c9cba162739b93a07067d8a286f6dad55e02217.tar.gz
opensim-SC-3c9cba162739b93a07067d8a286f6dad55e02217.tar.bz2
opensim-SC-3c9cba162739b93a07067d8a286f6dad55e02217.tar.xz
Added CreateObject(regionhandle, userID, itemID) to post objects that are to be fetched from the user's inventory server and rezzed in the region. Added all code necessary to fetch the item and the asset, and rez it inworld. The access to the item is uncap-ed and unverified -- I may place it later either under a cap or with auth verification. But in this model regions don't have the user's inventory, so they would have to guess the item IDs.
Added safemode config to Standalone Hypergrid, similar effect to AllowRegionAccessToInventory in Inventory Server. Everyone should have these vars set to their default values except me!
Diffstat (limited to 'OpenSim/Framework/Communications/Services')
-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)