diff options
author | Teravus Ovares | 2008-09-19 00:13:16 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-19 00:13:16 +0000 |
commit | a1217410e5cb22a5764f191b6abfa015ec9614d1 (patch) | |
tree | 16cf3e09f6a17ec6c02ce324df3110f7f588bc16 /OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs | |
parent | Fix llParcelMedia queries. Correct types and add a missing ToString() (XEngine) (diff) | |
download | opensim-SC-a1217410e5cb22a5764f191b6abfa015ec9614d1.zip opensim-SC-a1217410e5cb22a5764f191b6abfa015ec9614d1.tar.gz opensim-SC-a1217410e5cb22a5764f191b6abfa015ec9614d1.tar.bz2 opensim-SC-a1217410e5cb22a5764f191b6abfa015ec9614d1.tar.xz |
* Switches content type from application/xml+llsd to application/llsd+xml on outgoing requests.
* Monitors / for getting the seed cap for rez_avatar/request on application/llsd+xml && application/xml+llsd && !application/xml
* Experimental, this might break LibOMV temporarily.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index 687fa82..1fd559e 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -127,6 +127,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
127 | if (m_scene.Count == 0) | 127 | if (m_scene.Count == 0) |
128 | { | 128 | { |
129 | scene.AddLLSDHandler("/agent/", ProcessAgentDomainMessage); | 129 | scene.AddLLSDHandler("/agent/", ProcessAgentDomainMessage); |
130 | scene.AddLLSDHandler("/", ProcessAgentDomainMessage); | ||
130 | try | 131 | try |
131 | { | 132 | { |
132 | ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation; | 133 | ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation; |
@@ -200,9 +201,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
200 | // /agent/* | 201 | // /agent/* |
201 | 202 | ||
202 | string[] pathSegments = path.Split('/'); | 203 | string[] pathSegments = path.Split('/'); |
203 | if (pathSegments.Length < 1) | 204 | if (pathSegments.Length <= 1) |
204 | { | 205 | { |
205 | return GenerateNoHandlerMessage(); | 206 | return GenerateNoHandlerMessage(); |
207 | |||
208 | } | ||
209 | |||
210 | if (pathSegments[0].Length == 0 && pathSegments[1].Length == 0) | ||
211 | { | ||
212 | return GenerateRezAvatarRequestMessage(""); | ||
206 | } | 213 | } |
207 | 214 | ||
208 | m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", | 215 | m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", |
@@ -239,6 +246,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
239 | //return null; | 246 | //return null; |
240 | } | 247 | } |
241 | 248 | ||
249 | private LLSD GenerateRezAvatarRequestMessage(string regionname) | ||
250 | { | ||
251 | Scene region = GetRootScene(); | ||
252 | RegionInfo reg = region.RegionInfo; | ||
253 | |||
254 | LLSDMap responseMap = new LLSDMap(); | ||
255 | string rezHttpProtocol = "http://"; | ||
256 | string regionCapsHttpProtocol = "http://"; | ||
257 | string httpaddr = reg.ExternalHostName; | ||
258 | string urlport = reg.HttpPort.ToString(); | ||
259 | string requestpath = "/agent/" + UUID.Zero + "/rez_avatar/request"; | ||
260 | |||
261 | if (httpSSL) | ||
262 | { | ||
263 | rezHttpProtocol = "https://"; | ||
264 | regionCapsHttpProtocol = "https://"; | ||
265 | urlport = httpsslport.ToString(); | ||
266 | |||
267 | if (httpsCN.Length > 0) | ||
268 | httpaddr = httpsCN; | ||
269 | } | ||
270 | |||
271 | responseMap["connect"] = LLSD.FromBoolean(true); | ||
272 | responseMap["rez_avatar/request"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); | ||
273 | |||
274 | return responseMap; | ||
275 | } | ||
276 | |||
242 | // Using OpenSim.Framework.Communications.Capabilities.Caps here one time.. | 277 | // Using OpenSim.Framework.Communications.Capabilities.Caps here one time.. |
243 | // so the long name is probably better then a using statement | 278 | // so the long name is probably better then a using statement |
244 | public void OnRegisterCaps(UUID agentID, OpenSim.Framework.Communications.Capabilities.Caps caps) | 279 | public void OnRegisterCaps(UUID agentID, OpenSim.Framework.Communications.Capabilities.Caps caps) |
@@ -393,7 +428,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
393 | 428 | ||
394 | //string raCap = string.Empty; | 429 | //string raCap = string.Empty; |
395 | 430 | ||
396 | UUID AvatarRezCapUUID = UUID.Random(); | 431 | UUID AvatarRezCapUUID = LocalAgentID; |
397 | string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/rez"; | 432 | string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/rez"; |
398 | string derezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/derez"; | 433 | string derezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/derez"; |
399 | // Get a reference to the user's cap so we can pull out the Caps Object Path | 434 | // Get a reference to the user's cap so we can pull out the Caps Object Path |