aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2018-11-14 16:23:14 +0000
committerUbitUmarov2018-11-14 16:23:14 +0000
commitb48cbcbfdda1bf348a77554958bebea33560dbe6 (patch)
tree37aa567ef790dd0af446095e370c76f7d741b513 /OpenSim/Region
parentreplace Enviroment response encoding ( runprebuild needed) (diff)
downloadopensim-SC-b48cbcbfdda1bf348a77554958bebea33560dbe6.zip
opensim-SC-b48cbcbfdda1bf348a77554958bebea33560dbe6.tar.gz
opensim-SC-b48cbcbfdda1bf348a77554958bebea33560dbe6.tar.bz2
opensim-SC-b48cbcbfdda1bf348a77554958bebea33560dbe6.tar.xz
simplify a bit some caps paths
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs7
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs13
4 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index a02ef9d..dd410a7 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -350,17 +350,18 @@ namespace OpenSim.Region.ClientStack.Linden
350 public string SeedCapRequest(string request, string path, string param, 350 public string SeedCapRequest(string request, string path, string param,
351 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 351 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
352 { 352 {
353 UUID agentID = m_HostCapsObj.AgentID;
353 m_log.DebugFormat( 354 m_log.DebugFormat(
354 "[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, m_HostCapsObj.AgentID); 355 "[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, agentID);
355 356
356 if (!m_HostCapsObj.WaitForActivation()) 357 if (!m_HostCapsObj.WaitForActivation())
357 return string.Empty; 358 return string.Empty;
358 359
359 if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint)) 360 if (!m_Scene.CheckClient(agentID, httpRequest.RemoteIPEndPoint))
360 { 361 {
361 m_log.WarnFormat( 362 m_log.WarnFormat(
362 "[CAPS]: Unauthorized CAPS client {0} from {1}", 363 "[CAPS]: Unauthorized CAPS client {0} from {1}",
363 m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint); 364 agentID, httpRequest.RemoteIPEndPoint);
364 365
365 return string.Empty; 366 return string.Empty;
366 } 367 }
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
index b044e56..adb49bd 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.ClientStack.Linden
93 93
94 public void RegisterCaps(UUID agentID, Caps caps) 94 public void RegisterCaps(UUID agentID, Caps caps)
95 { 95 {
96 UUID capuuid = UUID.Random(); 96 string capUrl = "/CAPS/" + UUID.Random() + "/";
97 97
98 // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); 98 // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/");
99 99
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ClientStack.Linden
101 "ObjectAdd", 101 "ObjectAdd",
102 new RestHTTPHandler( 102 new RestHTTPHandler(
103 "POST", 103 "POST",
104 "/CAPS/OA/" + capuuid + "/", 104 capUrl,
105 httpMethod => ProcessAdd(httpMethod, agentID, caps), 105 httpMethod => ProcessAdd(httpMethod, agentID, caps),
106 "ObjectAdd", 106 "ObjectAdd",
107 agentID.ToString())); ; 107 agentID.ToString())); ;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index 116c51f..04d11cb 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -103,14 +103,14 @@ namespace OpenSim.Region.ClientStack.Linden
103 103
104 public void RegisterCaps(UUID agentID, Caps caps) 104 public void RegisterCaps(UUID agentID, Caps caps)
105 { 105 {
106 UUID capID = UUID.Random(); 106 string capUrl = "/CAPS/" + UUID.Random() + "/";
107 107
108// m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID); 108 // m_log.Debug("[UPLOAD OBJECT ASSET MODULE]: /CAPS/" + capID);
109 caps.RegisterHandler( 109 caps.RegisterHandler(
110 "UploadObjectAsset", 110 "UploadObjectAsset",
111 new RestHTTPHandler( 111 new RestHTTPHandler(
112 "POST", 112 "POST",
113 "/CAPS/OA/" + capID + "/", 113 capUrl,
114 httpMethod => ProcessAdd(httpMethod, agentID, caps), 114 httpMethod => ProcessAdd(httpMethod, agentID, caps),
115 "UploadObjectAsset", 115 "UploadObjectAsset",
116 agentID.ToString())); 116 agentID.ToString()));
diff --git a/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs b/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs
index 02378f2..4d7da65 100644
--- a/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs
+++ b/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs
@@ -51,10 +51,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
51 51
52 private Scene m_scene = null; 52 private Scene m_scene = null;
53 private UUID regionID = UUID.Zero; 53 private UUID regionID = UUID.Zero;
54 private static bool Enabled = false; 54 private bool Enabled = false;
55
56 private static readonly string capsName = "EnvironmentSettings";
57 private static readonly string capsBase = "/CAPS/0020/";
58 55
59 #region INonSharedRegionModule 56 #region INonSharedRegionModule
60 public void Initialise(IConfigSource source) 57 public void Initialise(IConfigSource source)
@@ -133,17 +130,17 @@ namespace OpenSim.Region.CoreModules.World.LightShare
133 // m_log.DebugFormat("[{0}]: Register capability for agentID {1} in region {2}", 130 // m_log.DebugFormat("[{0}]: Register capability for agentID {1} in region {2}",
134 // Name, agentID, caps.RegionName); 131 // Name, agentID, caps.RegionName);
135 132
136 string capsPath = capsBase + UUID.Random(); 133 string capsPath = "/CAPS/" + UUID.Random();
137 134
138 // Get handler 135 // Get handler
139 caps.RegisterHandler( 136 caps.RegisterHandler(
140 capsName, 137 "EnvironmentSettings",
141 new RestStreamHandler( 138 new RestStreamHandler(
142 "GET", 139 "GET",
143 capsPath, 140 capsPath,
144 (request, path, param, httpRequest, httpResponse) 141 (request, path, param, httpRequest, httpResponse)
145 => GetEnvironmentSettings(request, path, param, agentID, caps), 142 => GetEnvironmentSettings(request, path, param, agentID, caps),
146 capsName, 143 "EnvironmentSettings",
147 agentID.ToString())); 144 agentID.ToString()));
148 145
149 // Set handler 146 // Set handler
@@ -153,7 +150,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
153 capsPath, 150 capsPath,
154 (request, path, param, httpRequest, httpResponse) 151 (request, path, param, httpRequest, httpResponse)
155 => SetEnvironmentSettings(request, path, param, agentID, caps), 152 => SetEnvironmentSettings(request, path, param, agentID, caps),
156 capsName, 153 "EnvironmentSettings",
157 agentID.ToString())); 154 agentID.ToString()));
158 } 155 }
159 #endregion 156 #endregion