aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-17 21:00:34 +0000
committerJustin Clarke Casey2008-11-17 21:00:34 +0000
commitc25a0ea7923aa390d30b8eebdbca4e599edf9b0d (patch)
tree775133790681153be9edc6d640162271750a1fd0 /OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
parent* minor: add interface version to 'show version' command output (diff)
downloadopensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.zip
opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.gz
opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.bz2
opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.xz
* Update libOMV to r2359. This is necessary for the progressive texture patch
* Update libopenjpeg as well for this patch. * Appears to be okay on a very short sniff test * Source code will be placed in opensim-libs shortly
Diffstat (limited to 'OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs284
1 files changed, 142 insertions, 142 deletions
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index 5b06408..1c86c2f 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -46,9 +46,9 @@ using OpenSim.Framework.Servers;
46using OpenSim.Region.Environment.Interfaces; 46using OpenSim.Region.Environment.Interfaces;
47using OpenSim.Region.Environment.Scenes; 47using OpenSim.Region.Environment.Scenes;
48 48
49using LLSD = OpenMetaverse.StructuredData.LLSD; 49using OSD = OpenMetaverse.StructuredData.OSD;
50using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; 50using OSDMap = OpenMetaverse.StructuredData.OSDMap;
51using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; 51using OSDArray = OpenMetaverse.StructuredData.OSDArray;
52 52
53namespace OpenSim.Region.Environment.Modules.InterGrid 53namespace OpenSim.Region.Environment.Modules.InterGrid
54{ 54{
@@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
218 218
219 #endregion 219 #endregion
220 220
221 public LLSD ProcessRegionDomainSeed(string path, LLSD request, string endpoint) 221 public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint)
222 { 222 {
223 string[] pathSegments = path.Split('/'); 223 string[] pathSegments = path.Split('/');
224 224
@@ -234,11 +234,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
234 234
235 //m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", 235 //m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}",
236 // path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]); 236 // path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]);
237 //return new LLSDMap(); 237 //return new OSDMap();
238 238
239 } 239 }
240 240
241 public LLSD ProcessAgentDomainMessage(string path, LLSD request, string endpoint) 241 public OSD ProcessAgentDomainMessage(string path, OSD request, string endpoint)
242 { 242 {
243 // /agent/* 243 // /agent/*
244 244
@@ -288,7 +288,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
288 //return null; 288 //return null;
289 } 289 }
290 290
291 private LLSD GenerateRezAvatarRequestMessage(string regionname) 291 private OSD GenerateRezAvatarRequestMessage(string regionname)
292 { 292 {
293 Scene region = null; 293 Scene region = null;
294 bool usedroot = false; 294 bool usedroot = false;
@@ -319,7 +319,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
319 319
320 RegionInfo reg = region.RegionInfo; 320 RegionInfo reg = region.RegionInfo;
321 321
322 LLSDMap responseMap = new LLSDMap(); 322 OSDMap responseMap = new OSDMap();
323 string rezHttpProtocol = "http://"; 323 string rezHttpProtocol = "http://";
324 //string regionCapsHttpProtocol = "http://"; 324 //string regionCapsHttpProtocol = "http://";
325 string httpaddr = reg.ExternalHostName; 325 string httpaddr = reg.ExternalHostName;
@@ -347,9 +347,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
347 httpaddr = httpsCN; 347 httpaddr = httpsCN;
348 } 348 }
349 349
350 responseMap["connect"] = LLSD.FromBoolean(true); 350 responseMap["connect"] = OSD.FromBoolean(true);
351 LLSDMap capabilitiesMap = new LLSDMap(); 351 OSDMap capabilitiesMap = new OSDMap();
352 capabilitiesMap["rez_avatar/request"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath); 352 capabilitiesMap["rez_avatar/request"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath);
353 responseMap["capabilities"] = capabilitiesMap; 353 responseMap["capabilities"] = capabilitiesMap;
354 354
355 return responseMap; 355 return responseMap;
@@ -376,11 +376,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
376 } 376 }
377 377
378 378
379 public LLSD RequestRezAvatarMethod(string path, LLSD request) 379 public OSD RequestRezAvatarMethod(string path, OSD request)
380 { 380 {
381 //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString()); 381 //System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString());
382 382
383 LLSDMap requestMap = (LLSDMap)request; 383 OSDMap requestMap = (OSDMap)request;
384 384
385 385
386 Scene homeScene = null; 386 Scene homeScene = null;
@@ -441,27 +441,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
441 441
442 UpdateOGPState(LocalAgentID, userState); 442 UpdateOGPState(LocalAgentID, userState);
443 443
444 LLSDMap responseMap = new LLSDMap(); 444 OSDMap responseMap = new OSDMap();
445 445
446 if (RemoteAgentID == UUID.Zero) 446 if (RemoteAgentID == UUID.Zero)
447 { 447 {
448 responseMap["connect"] = LLSD.FromBoolean(false); 448 responseMap["connect"] = OSD.FromBoolean(false);
449 responseMap["message"] = LLSD.FromString("No agent ID was specified in rez_avatar/request"); 449 responseMap["message"] = OSD.FromString("No agent ID was specified in rez_avatar/request");
450 m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body"); 450 m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body");
451 return responseMap; 451 return responseMap;
452 } 452 }
453 453
454 responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName); 454 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);
455 455
456 // DEPRECIATED 456 // DEPRECIATED
457 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); 457 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
458 458
459 responseMap["connect"] = LLSD.FromBoolean(true); 459 responseMap["connect"] = OSD.FromBoolean(true);
460 responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); 460 responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port);
461 responseMap["region_x"] = LLSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX 461 responseMap["region_x"] = OSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX
462 responseMap["region_y"] = LLSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY 462 responseMap["region_y"] = OSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY
463 responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); 463 responseMap["region_id"] = OSD.FromUUID(reg.originRegionID);
464 responseMap["sim_access"] = LLSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG"); 464 responseMap["sim_access"] = OSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG");
465 465
466 // Generate a dummy agent for the user so we can get back a CAPS path 466 // Generate a dummy agent for the user so we can get back a CAPS path
467 AgentCircuitData agentData = new AgentCircuitData(); 467 AgentCircuitData agentData = new AgentCircuitData();
@@ -575,14 +575,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
575 575
576 576
577 // DEPRECIATED 577 // DEPRECIATED
578 responseMap["seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 578 responseMap["seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
579 579
580 // REPLACEMENT 580 // REPLACEMENT
581 responseMap["region_seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 581 responseMap["region_seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
582 582
583 responseMap["rez_avatar"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); 583 responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
584 responseMap["rez_avatar/rez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); 584 responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
585 responseMap["rez_avatar/derez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); 585 responseMap["rez_avatar/derez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath);
586 586
587 // Add the user to the list of CAPS that are outstanding. 587 // Add the user to the list of CAPS that are outstanding.
588 // well allow the caps hosts in this dictionary 588 // well allow the caps hosts in this dictionary
@@ -605,27 +605,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
605 return responseMap; 605 return responseMap;
606 } 606 }
607 607
608 public LLSD RezAvatarMethod(string path, LLSD request) 608 public OSD RezAvatarMethod(string path, OSD request)
609 { 609 {
610 m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString()); 610 m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString());
611 611
612 LLSDMap responseMap = new LLSDMap(); 612 OSDMap responseMap = new OSDMap();
613 613
614 AgentCircuitData userData = null; 614 AgentCircuitData userData = null;
615 615
616 // Only people we've issued a cap can go further 616 // Only people we've issued a cap can go further
617 if (TryGetAgentCircuitData(path,out userData)) 617 if (TryGetAgentCircuitData(path,out userData))
618 { 618 {
619 LLSDMap requestMap = (LLSDMap)request; 619 OSDMap requestMap = (OSDMap)request;
620 620
621 // take these values to start. There's a few more 621 // take these values to start. There's a few more
622 UUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); 622 UUID SecureSessionID=requestMap["secure_session_id"].AsUUID();
623 UUID SessionID = requestMap["session_id"].AsUUID(); 623 UUID SessionID = requestMap["session_id"].AsUUID();
624 int circuitcode = requestMap["circuit_code"].AsInteger(); 624 int circuitcode = requestMap["circuit_code"].AsInteger();
625 LLSDArray Parameter = new LLSDArray(); 625 OSDArray Parameter = new OSDArray();
626 if (requestMap.ContainsKey("parameter")) 626 if (requestMap.ContainsKey("parameter"))
627 { 627 {
628 Parameter = (LLSDArray)((LLSD)requestMap["parameter"]); 628 Parameter = (OSDArray)requestMap["parameter"];
629 } 629 }
630 630
631 //int version = 1; 631 //int version = 1;
@@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
636 636
637 for (int i = 0; i < Parameter.Count; i++) 637 for (int i = 0; i < Parameter.Count; i++)
638 { 638 {
639 LLSDMap item = (LLSDMap)Parameter[i]; 639 OSDMap item = (OSDMap)Parameter[i];
640// if (item.ContainsKey("version")) 640// if (item.ContainsKey("version"))
641// { 641// {
642// version = item["version"].AsInteger(); 642// version = item["version"].AsInteger();
@@ -714,15 +714,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
714 RegionInfo reg = homeScene.RegionInfo; 714 RegionInfo reg = homeScene.RegionInfo;
715 715
716 // Dummy positional and look at info.. we don't have it. 716 // Dummy positional and look at info.. we don't have it.
717 LLSDArray PositionArray = new LLSDArray(); 717 OSDArray PositionArray = new OSDArray();
718 PositionArray.Add(LLSD.FromInteger(128)); 718 PositionArray.Add(OSD.FromInteger(128));
719 PositionArray.Add(LLSD.FromInteger(128)); 719 PositionArray.Add(OSD.FromInteger(128));
720 PositionArray.Add(LLSD.FromInteger(40)); 720 PositionArray.Add(OSD.FromInteger(40));
721 721
722 LLSDArray LookAtArray = new LLSDArray(); 722 OSDArray LookAtArray = new OSDArray();
723 LookAtArray.Add(LLSD.FromInteger(1)); 723 LookAtArray.Add(OSD.FromInteger(1));
724 LookAtArray.Add(LLSD.FromInteger(1)); 724 LookAtArray.Add(OSD.FromInteger(1));
725 LookAtArray.Add(LLSD.FromInteger(1)); 725 LookAtArray.Add(OSD.FromInteger(1));
726 726
727 // Our region's X and Y position in OpenSimulator space. 727 // Our region's X and Y position in OpenSimulator space.
728 uint fooX = reg.RegionLocX; 728 uint fooX = reg.RegionLocX;
@@ -732,31 +732,31 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
732 m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID); 732 m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID);
733 733
734 // Convert the X and Y position to LL space 734 // Convert the X and Y position to LL space
735 responseMap["region_x"] = LLSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X 735 responseMap["region_x"] = OSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X
736 responseMap["region_y"] = LLSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y 736 responseMap["region_y"] = OSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y
737 737
738 // Give em a new seed capability 738 // Give em a new seed capability
739 responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); 739 responseMap["seed_capability"] = OSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
740 responseMap["region"] = LLSD.FromUUID(reg.originRegionID); 740 responseMap["region"] = OSD.FromUUID(reg.originRegionID);
741 responseMap["look_at"] = LookAtArray; 741 responseMap["look_at"] = LookAtArray;
742 742
743 responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port); 743 responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port);
744 responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString()); 744 responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString());
745 745
746 // DEPRECIATED 746 // DEPRECIATED
747 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString()); 747 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
748 748
749 responseMap["session_id"] = LLSD.FromUUID(SessionID); 749 responseMap["session_id"] = OSD.FromUUID(SessionID);
750 responseMap["secure_session_id"] = LLSD.FromUUID(SecureSessionID); 750 responseMap["secure_session_id"] = OSD.FromUUID(SecureSessionID);
751 responseMap["circuit_code"] = LLSD.FromInteger(circuitcode); 751 responseMap["circuit_code"] = OSD.FromInteger(circuitcode);
752 752
753 responseMap["position"] = PositionArray; 753 responseMap["position"] = PositionArray;
754 754
755 responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID); 755 responseMap["region_id"] = OSD.FromUUID(reg.originRegionID);
756 756
757 responseMap["sim_access"] = LLSD.FromString("Mature"); 757 responseMap["sim_access"] = OSD.FromString("Mature");
758 758
759 responseMap["connect"] = LLSD.FromBoolean(true); 759 responseMap["connect"] = OSD.FromBoolean(true);
760 760
761 761
762 762
@@ -767,12 +767,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
767 return responseMap; 767 return responseMap;
768 } 768 }
769 769
770 public LLSD DerezAvatarMethod(string path, LLSD request) 770 public OSD DerezAvatarMethod(string path, OSD request)
771 { 771 {
772 m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString()); 772 m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString());
773 773
774 //LLSD llsdResponse = null; 774 //LLSD llsdResponse = null;
775 LLSDMap responseMap = new LLSDMap(); 775 OSDMap responseMap = new OSDMap();
776 776
777 string[] PathArray = path.Split('/'); 777 string[] PathArray = path.Split('/');
778 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); 778 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
@@ -790,34 +790,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
790 OGPState userState = GetOGPState(LocalID); 790 OGPState userState = GetOGPState(LocalID);
791 if (userState.agent_id != UUID.Zero) 791 if (userState.agent_id != UUID.Zero)
792 { 792 {
793 //LLSDMap outboundRequestMap = new LLSDMap(); 793 //OSDMap outboundRequestMap = new OSDMap();
794 LLSDMap inboundRequestMap = (LLSDMap)request; 794 OSDMap inboundRequestMap = (OSDMap)request;
795 string rezAvatarString = inboundRequestMap["rez_avatar"].AsString(); 795 string rezAvatarString = inboundRequestMap["rez_avatar"].AsString();
796 if (rezAvatarString.Length == 0) 796 if (rezAvatarString.Length == 0)
797 { 797 {
798 rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString(); 798 rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString();
799 } 799 }
800 LLSDArray LookAtArray = new LLSDArray(); 800 OSDArray LookAtArray = new OSDArray();
801 LookAtArray.Add(LLSD.FromInteger(1)); 801 LookAtArray.Add(OSD.FromInteger(1));
802 LookAtArray.Add(LLSD.FromInteger(1)); 802 LookAtArray.Add(OSD.FromInteger(1));
803 LookAtArray.Add(LLSD.FromInteger(1)); 803 LookAtArray.Add(OSD.FromInteger(1));
804 804
805 LLSDArray PositionArray = new LLSDArray(); 805 OSDArray PositionArray = new OSDArray();
806 PositionArray.Add(LLSD.FromInteger(128)); 806 PositionArray.Add(OSD.FromInteger(128));
807 PositionArray.Add(LLSD.FromInteger(128)); 807 PositionArray.Add(OSD.FromInteger(128));
808 PositionArray.Add(LLSD.FromInteger(40)); 808 PositionArray.Add(OSD.FromInteger(40));
809 809
810 LLSDArray lookArray = new LLSDArray(); 810 OSDArray lookArray = new OSDArray();
811 lookArray.Add(LLSD.FromInteger(128)); 811 lookArray.Add(OSD.FromInteger(128));
812 lookArray.Add(LLSD.FromInteger(128)); 812 lookArray.Add(OSD.FromInteger(128));
813 lookArray.Add(LLSD.FromInteger(40)); 813 lookArray.Add(OSD.FromInteger(40));
814 814
815 responseMap["connect"] = LLSD.FromBoolean(true);// it's okay to give this user up 815 responseMap["connect"] = OSD.FromBoolean(true);// it's okay to give this user up
816 responseMap["look_at"] = LookAtArray; 816 responseMap["look_at"] = LookAtArray;
817 817
818 m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name); 818 m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name);
819 819
820 LLSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState); 820 OSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState);
821 821
822 // If invoking it returned an error, parse and end 822 // If invoking it returned an error, parse and end
823 if (rezResponseMap.ContainsKey("connect")) 823 if (rezResponseMap.ContainsKey("connect"))
@@ -852,34 +852,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
852 int rrY = rezResponseMap["region_y"].AsInteger(); 852 int rrY = rezResponseMap["region_y"].AsInteger();
853 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); 853 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
854 UUID rrRID = rezResponseMap["region_id"].AsUUID(); 854 UUID rrRID = rezResponseMap["region_id"].AsUUID();
855 LLSDArray RezResponsePositionArray = null; 855 OSDArray RezResponsePositionArray = null;
856 string rrAccess = rezResponseMap["sim_access"].AsString(); 856 string rrAccess = rezResponseMap["sim_access"].AsString();
857 if (rezResponseMap.ContainsKey("position")) 857 if (rezResponseMap.ContainsKey("position"))
858 { 858 {
859 RezResponsePositionArray = (LLSDArray)rezResponseMap["position"]; 859 RezResponsePositionArray = (OSDArray)rezResponseMap["position"];
860 } 860 }
861 // DEPRECIATED 861 // DEPRECIATED
862 responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap); 862 responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap);
863 863
864 // REPLACEMENT r3 864 // REPLACEMENT r3
865 responseMap["region_seed_capability"] = LLSD.FromString(rezRespSeedCap); 865 responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap);
866 866
867 // DEPRECIATED 867 // DEPRECIATED
868 responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); 868 responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
869 869
870 responseMap["sim_host"] = LLSD.FromString(rezRespSim_host); 870 responseMap["sim_host"] = OSD.FromString(rezRespSim_host);
871 responseMap["sim_port"] = LLSD.FromInteger(rrPort); 871 responseMap["sim_port"] = OSD.FromInteger(rrPort);
872 responseMap["region_x"] = LLSD.FromInteger(rrX ); 872 responseMap["region_x"] = OSD.FromInteger(rrX );
873 responseMap["region_y"] = LLSD.FromInteger(rrY ); 873 responseMap["region_y"] = OSD.FromInteger(rrY );
874 responseMap["region_id"] = LLSD.FromUUID(rrRID); 874 responseMap["region_id"] = OSD.FromUUID(rrRID);
875 responseMap["sim_access"] = LLSD.FromString(rrAccess); 875 responseMap["sim_access"] = OSD.FromString(rrAccess);
876 876
877 if (RezResponsePositionArray != null) 877 if (RezResponsePositionArray != null)
878 { 878 {
879 responseMap["position"] = RezResponsePositionArray; 879 responseMap["position"] = RezResponsePositionArray;
880 } 880 }
881 responseMap["look_at"] = lookArray; 881 responseMap["look_at"] = lookArray;
882 responseMap["connect"] = LLSD.FromBoolean(true); 882 responseMap["connect"] = OSD.FromBoolean(true);
883 883
884 ShutdownConnection(LocalID,this); 884 ShutdownConnection(LocalID,this);
885 // PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS 885 // PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS
@@ -899,7 +899,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
899 //return responseMap; 899 //return responseMap;
900 } 900 }
901 901
902 private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState) 902 private OSDMap invokeRezAvatarCap(OSDMap responseMap, string CapAddress, OGPState userState)
903 { 903 {
904 Scene reg = GetRootScene(); 904 Scene reg = GetRootScene();
905 905
@@ -907,38 +907,38 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
907 DeRezRequest.Method = "POST"; 907 DeRezRequest.Method = "POST";
908 DeRezRequest.ContentType = "application/xml+llsd"; 908 DeRezRequest.ContentType = "application/xml+llsd";
909 909
910 LLSDMap RAMap = new LLSDMap(); 910 OSDMap RAMap = new OSDMap();
911 LLSDMap AgentParms = new LLSDMap(); 911 OSDMap AgentParms = new OSDMap();
912 LLSDMap RegionParms = new LLSDMap(); 912 OSDMap RegionParms = new OSDMap();
913 913
914 LLSDArray Parameter = new LLSDArray(2); 914 OSDArray Parameter = new OSDArray(2);
915 915
916 LLSDMap version = new LLSDMap(); 916 OSDMap version = new OSDMap();
917 version["version"] = LLSD.FromInteger(userState.src_version); 917 version["version"] = OSD.FromInteger(userState.src_version);
918 Parameter.Add((LLSD)version); 918 Parameter.Add(version);
919 919
920 LLSDMap SrcData = new LLSDMap(); 920 OSDMap SrcData = new OSDMap();
921 SrcData["estate_id"] = LLSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID); 921 SrcData["estate_id"] = OSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID);
922 SrcData["parent_estate_id"] = LLSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID)); 922 SrcData["parent_estate_id"] = OSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID));
923 SrcData["region_id"] = LLSD.FromUUID(reg.RegionInfo.originRegionID); 923 SrcData["region_id"] = OSD.FromUUID(reg.RegionInfo.originRegionID);
924 SrcData["visible_to_parent"] = LLSD.FromBoolean(userState.visible_to_parent); 924 SrcData["visible_to_parent"] = OSD.FromBoolean(userState.visible_to_parent);
925 Parameter.Add((LLSD)SrcData); 925 Parameter.Add(SrcData);
926 926
927 AgentParms["first_name"] = LLSD.FromString(userState.first_name); 927 AgentParms["first_name"] = OSD.FromString(userState.first_name);
928 AgentParms["last_name"] = LLSD.FromString(userState.last_name); 928 AgentParms["last_name"] = OSD.FromString(userState.last_name);
929 AgentParms["agent_id"] = LLSD.FromUUID(userState.agent_id); 929 AgentParms["agent_id"] = OSD.FromUUID(userState.agent_id);
930 RegionParms["region_id"] = LLSD.FromUUID(userState.region_id); 930 RegionParms["region_id"] = OSD.FromUUID(userState.region_id);
931 AgentParms["circuit_code"] = LLSD.FromInteger(userState.circuit_code); 931 AgentParms["circuit_code"] = OSD.FromInteger(userState.circuit_code);
932 AgentParms["secure_session_id"] = LLSD.FromUUID(userState.secure_session_id); 932 AgentParms["secure_session_id"] = OSD.FromUUID(userState.secure_session_id);
933 AgentParms["session_id"] = LLSD.FromUUID(userState.session_id); 933 AgentParms["session_id"] = OSD.FromUUID(userState.session_id);
934 AgentParms["agent_access"] = LLSD.FromBoolean(userState.agent_access); 934 AgentParms["agent_access"] = OSD.FromBoolean(userState.agent_access);
935 AgentParms["god_level"] = LLSD.FromInteger(userState.god_level); 935 AgentParms["god_level"] = OSD.FromInteger(userState.god_level);
936 AgentParms["god_overide"] = LLSD.FromBoolean(userState.god_overide); 936 AgentParms["god_overide"] = OSD.FromBoolean(userState.god_overide);
937 AgentParms["identified"] = LLSD.FromBoolean(userState.identified); 937 AgentParms["identified"] = OSD.FromBoolean(userState.identified);
938 AgentParms["transacted"] = LLSD.FromBoolean(userState.transacted); 938 AgentParms["transacted"] = OSD.FromBoolean(userState.transacted);
939 AgentParms["age_verified"] = LLSD.FromBoolean(userState.age_verified); 939 AgentParms["age_verified"] = OSD.FromBoolean(userState.age_verified);
940 AgentParms["limited_to_estate"] = LLSD.FromInteger(userState.limited_to_estate); 940 AgentParms["limited_to_estate"] = OSD.FromInteger(userState.limited_to_estate);
941 AgentParms["inventory_host"] = LLSD.FromString(userState.inventory_host); 941 AgentParms["inventory_host"] = OSD.FromString(userState.inventory_host);
942 942
943 // version 1 943 // version 1
944 RAMap = AgentParms; 944 RAMap = AgentParms;
@@ -951,11 +951,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
951 951
952 string RAMapString = RAMap.ToString(); 952 string RAMapString = RAMap.ToString();
953 m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString); 953 m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString);
954 LLSD LLSDofRAMap = RAMap; // RENAME if this works 954 OSD LLSDofRAMap = RAMap; // RENAME if this works
955 955
956 m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString()); 956 m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString());
957 //m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap)); 957 //m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap));
958 byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap); 958 byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap);
959 959
960 //string bufferDump = System.Text.Encoding.ASCII.GetString(buffer); 960 //string bufferDump = System.Text.Encoding.ASCII.GetString(buffer);
961 //m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump); 961 //m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump);
@@ -973,7 +973,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
973 catch (WebException ex) 973 catch (WebException ex)
974 { 974 {
975 m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message); 975 m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message);
976 responseMap["connect"] = LLSD.FromBoolean(false); 976 responseMap["connect"] = OSD.FromBoolean(false);
977 977
978 return responseMap; 978 return responseMap;
979 } 979 }
@@ -997,21 +997,21 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
997 catch (WebException ex) 997 catch (WebException ex)
998 { 998 {
999 m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message); 999 m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message);
1000 responseMap["connect"] = LLSD.FromBoolean(false); 1000 responseMap["connect"] = OSD.FromBoolean(false);
1001 1001
1002 return responseMap; 1002 return responseMap;
1003 } 1003 }
1004 LLSD rezResponse = null; 1004 OSD rezResponse = null;
1005 try 1005 try
1006 { 1006 {
1007 rezResponse = LLSDParser.DeserializeXml(rez_avatar_reply); 1007 rezResponse = OSDParser.DeserializeLLSDXml(rez_avatar_reply);
1008 1008
1009 responseMap = (LLSDMap)rezResponse; 1009 responseMap = (OSDMap)rezResponse;
1010 } 1010 }
1011 catch (Exception ex) 1011 catch (Exception ex)
1012 { 1012 {
1013 m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); 1013 m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
1014 responseMap["connect"] = LLSD.FromBoolean(false); 1014 responseMap["connect"] = OSD.FromBoolean(false);
1015 1015
1016 return responseMap; 1016 return responseMap;
1017 } 1017 }
@@ -1019,22 +1019,22 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
1019 return responseMap; 1019 return responseMap;
1020 } 1020 }
1021 1021
1022 public LLSD GenerateNoHandlerMessage() 1022 public OSD GenerateNoHandlerMessage()
1023 { 1023 {
1024 LLSDMap map = new LLSDMap(); 1024 OSDMap map = new OSDMap();
1025 map["reason"] = LLSD.FromString("LLSDRequest"); 1025 map["reason"] = OSD.FromString("LLSDRequest");
1026 map["message"] = LLSD.FromString("No handler registered for LLSD Requests"); 1026 map["message"] = OSD.FromString("No handler registered for LLSD Requests");
1027 map["login"] = LLSD.FromString("false"); 1027 map["login"] = OSD.FromString("false");
1028 map["connect"] = LLSD.FromString("false"); 1028 map["connect"] = OSD.FromString("false");
1029 return map; 1029 return map;
1030 } 1030 }
1031 public LLSD GenerateNoStateMessage(UUID passedAvatar) 1031 public OSD GenerateNoStateMessage(UUID passedAvatar)
1032 { 1032 {
1033 LLSDMap map = new LLSDMap(); 1033 OSDMap map = new OSDMap();
1034 map["reason"] = LLSD.FromString("derez failed"); 1034 map["reason"] = OSD.FromString("derez failed");
1035 map["message"] = LLSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString()); 1035 map["message"] = OSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString());
1036 map["login"] = LLSD.FromString("false"); 1036 map["login"] = OSD.FromString("false");
1037 map["connect"] = LLSD.FromString("false"); 1037 map["connect"] = OSD.FromString("false");
1038 return map; 1038 return map;
1039 } 1039 }
1040 private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata) 1040 private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata)