mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
change to avn fecthinventory and webfecth.. code
This commit is contained in:
@@ -25,16 +25,20 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using Mono.Addins;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Mono.Addins;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Capabilities.Handlers;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using System;
|
||||
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||
using OpenSim.Capabilities.Handlers;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
@@ -54,6 +58,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
private string m_fetchInventory2Url;
|
||||
|
||||
private FetchInventory2Handler m_fetchHandler;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
@@ -92,6 +98,10 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
m_inventoryService = m_scene.InventoryService;
|
||||
|
||||
// We'll reuse the same handler for all requests.
|
||||
if (m_fetchInventory2Url == "localhost")
|
||||
m_fetchHandler = new FetchInventory2Handler(m_inventoryService);
|
||||
|
||||
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
|
||||
}
|
||||
|
||||
@@ -121,11 +131,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
capUrl = "/CAPS/" + UUID.Random();
|
||||
|
||||
FetchInventory2Handler fetchHandler = new FetchInventory2Handler(m_inventoryService, agentID);
|
||||
|
||||
IRequestHandler reqHandler
|
||||
= new RestStreamHandler(
|
||||
"POST", capUrl, fetchHandler.FetchInventoryRequest, capName, agentID.ToString());
|
||||
"POST", capUrl, m_fetchHandler.FetchInventoryRequest, capName, agentID.ToString());
|
||||
|
||||
caps.RegisterHandler(capName, reqHandler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user