mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
remove cap FetchLib2 suport code
This commit is contained in:
@@ -47,14 +47,12 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public bool Enabled { get; private set; }
|
||||
private bool m_enabledLib;
|
||||
|
||||
private Scene m_scene;
|
||||
|
||||
private IInventoryService m_inventoryService;
|
||||
private ILibraryService m_LibraryService;
|
||||
private string m_fetchInventory2Url;
|
||||
private string m_fetchLib2Url;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
|
||||
@@ -65,12 +63,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
return;
|
||||
|
||||
m_fetchInventory2Url = config.GetString("Cap_FetchInventory2", string.Empty);
|
||||
m_fetchLib2Url = config.GetString("Cap_FetchLib2", "localhost");
|
||||
|
||||
if (m_fetchInventory2Url != string.Empty)
|
||||
Enabled = true;
|
||||
if (m_fetchInventory2Url != string.Empty)
|
||||
m_enabledLib = true;
|
||||
}
|
||||
|
||||
public void AddRegion(Scene s)
|
||||
@@ -116,8 +111,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
private void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
RegisterFetchCap(agentID, caps, "FetchInventory2", m_fetchInventory2Url);
|
||||
if(m_enabledLib)
|
||||
RegisterFetchLibCap(agentID, caps, "FetchLib2", m_fetchLib2Url);
|
||||
}
|
||||
|
||||
private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url)
|
||||
@@ -143,34 +136,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
caps.RegisterHandler(capName, capUrl);
|
||||
}
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[FETCH INVENTORY2 MODULE]: Registered capability {0} at {1} in region {2} for {3}",
|
||||
// capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
|
||||
}
|
||||
|
||||
private void RegisterFetchLibCap(UUID agentID, Caps caps, string capName, string url)
|
||||
{
|
||||
string capUrl;
|
||||
|
||||
if (url == "localhost")
|
||||
{
|
||||
capUrl = "/CAPS/" + UUID.Random();
|
||||
|
||||
FetchLib2Handler fetchHandler = new FetchLib2Handler(m_inventoryService, m_LibraryService, agentID);
|
||||
|
||||
IRequestHandler reqHandler
|
||||
= new RestStreamHandler(
|
||||
"POST", capUrl, fetchHandler.FetchLibRequest, capName, agentID.ToString());
|
||||
|
||||
caps.RegisterHandler(capName, reqHandler);
|
||||
}
|
||||
else
|
||||
{
|
||||
capUrl = url;
|
||||
|
||||
caps.RegisterHandler(capName, capUrl);
|
||||
}
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[FETCH INVENTORY2 MODULE]: Registered capability {0} at {1} in region {2} for {3}",
|
||||
// capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
|
||||
|
||||
Reference in New Issue
Block a user