mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
simplify a bit some caps paths
This commit is contained in:
@@ -350,17 +350,18 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
public string SeedCapRequest(string request, string path, string param,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
UUID agentID = m_HostCapsObj.AgentID;
|
||||
m_log.DebugFormat(
|
||||
"[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, m_HostCapsObj.AgentID);
|
||||
"[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, agentID);
|
||||
|
||||
if (!m_HostCapsObj.WaitForActivation())
|
||||
return string.Empty;
|
||||
|
||||
if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint))
|
||||
if (!m_Scene.CheckClient(agentID, httpRequest.RemoteIPEndPoint))
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[CAPS]: Unauthorized CAPS client {0} from {1}",
|
||||
m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint);
|
||||
agentID, httpRequest.RemoteIPEndPoint);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
public void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
UUID capuuid = UUID.Random();
|
||||
string capUrl = "/CAPS/" + UUID.Random() + "/";
|
||||
|
||||
// m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/");
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
"ObjectAdd",
|
||||
new RestHTTPHandler(
|
||||
"POST",
|
||||
"/CAPS/OA/" + capuuid + "/",
|
||||
capUrl,
|
||||
httpMethod => ProcessAdd(httpMethod, agentID, caps),
|
||||
"ObjectAdd",
|
||||
agentID.ToString())); ;
|
||||
|
||||
@@ -103,14 +103,14 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
public void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
UUID capID = UUID.Random();
|
||||
string capUrl = "/CAPS/" + UUID.Random() + "/";
|
||||
|
||||
// m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID);
|
||||
// m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID);
|
||||
caps.RegisterHandler(
|
||||
"UploadObjectAsset",
|
||||
new RestHTTPHandler(
|
||||
"POST",
|
||||
"/CAPS/OA/" + capID + "/",
|
||||
capUrl,
|
||||
httpMethod => ProcessAdd(httpMethod, agentID, caps),
|
||||
"UploadObjectAsset",
|
||||
agentID.ToString()));
|
||||
|
||||
Reference in New Issue
Block a user