aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs86
1 files changed, 43 insertions, 43 deletions
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index 8fad62f..8fd4104 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -37,8 +37,8 @@ using System.Reflection;
37using System.Text.RegularExpressions; 37using System.Text.RegularExpressions;
38using System.Threading; 38using System.Threading;
39 39
40using libsecondlife; 40using OpenMetaverse;
41using libsecondlife.StructuredData; 41using OpenMetaverse.StructuredData;
42 42
43using log4net; 43using log4net;
44using Nini.Config; 44using Nini.Config;
@@ -50,9 +50,9 @@ using OpenSim.Region.Environment.Scenes;
50using OpenSim.Framework.Communications.Cache; 50using OpenSim.Framework.Communications.Cache;
51using OpenSim.Framework.Communications.Capabilities; 51using OpenSim.Framework.Communications.Capabilities;
52using OpenSim.Framework.Statistics; 52using OpenSim.Framework.Statistics;
53using LLSD = libsecondlife.StructuredData.LLSD; 53using LLSD = OpenMetaverse.StructuredData.LLSD;
54using LLSDMap = libsecondlife.StructuredData.LLSDMap; 54using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
55using LLSDArray = libsecondlife.StructuredData.LLSDArray; 55using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
56 56
57namespace OpenSim.Region.Environment.Modules.InterGrid 57namespace OpenSim.Region.Environment.Modules.InterGrid
58{ 58{
@@ -60,12 +60,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
60 { 60 {
61 public string first_name; 61 public string first_name;
62 public string last_name; 62 public string last_name;
63 public LLUUID agent_id; 63 public UUID agent_id;
64 public LLUUID local_agent_id; 64 public UUID local_agent_id;
65 public LLUUID region_id; 65 public UUID region_id;
66 public uint circuit_code; 66 public uint circuit_code;
67 public LLUUID secure_session_id; 67 public UUID secure_session_id;
68 public LLUUID session_id; 68 public UUID session_id;
69 public bool agent_access; 69 public bool agent_access;
70 public string sim_access; 70 public string sim_access;
71 public uint god_level; 71 public uint god_level;
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
89 private List<Scene> m_scene = new List<Scene>(); 89 private List<Scene> m_scene = new List<Scene>();
90 90
91 private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>(); 91 private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>();
92 private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>(); 92 private Dictionary<UUID, OGPState> m_OGPState = new Dictionary<UUID, OGPState>();
93 private string LastNameSuffix = "_EXTERNAL"; 93 private string LastNameSuffix = "_EXTERNAL";
94 private string FirstNamePrefix = ""; 94 private string FirstNamePrefix = "";
95 95
@@ -231,10 +231,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
231 //string RegionURI = reg.ServerURI; 231 //string RegionURI = reg.ServerURI;
232 //int RegionPort = (int)reg.HttpPort; 232 //int RegionPort = (int)reg.HttpPort;
233 233
234 LLUUID RemoteAgentID = requestMap["agent_id"].AsUUID(); 234 UUID RemoteAgentID = requestMap["agent_id"].AsUUID();
235 235
236 // will be used in the future. The client always connects with the aditi agentid currently 236 // will be used in the future. The client always connects with the aditi agentid currently
237 LLUUID LocalAgentID = RemoteAgentID; 237 UUID LocalAgentID = RemoteAgentID;
238 238
239 string FirstName = requestMap["first_name"].AsString(); 239 string FirstName = requestMap["first_name"].AsString();
240 string LastName = requestMap["last_name"].AsString(); 240 string LastName = requestMap["last_name"].AsString();
@@ -274,15 +274,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
274 // Generate a dummy agent for the user so we can get back a CAPS path 274 // Generate a dummy agent for the user so we can get back a CAPS path
275 AgentCircuitData agentData = new AgentCircuitData(); 275 AgentCircuitData agentData = new AgentCircuitData();
276 agentData.AgentID = LocalAgentID; 276 agentData.AgentID = LocalAgentID;
277 agentData.BaseFolder=LLUUID.Zero; 277 agentData.BaseFolder=UUID.Zero;
278 agentData.CapsPath=Util.GetRandomCapsPath(); 278 agentData.CapsPath=Util.GetRandomCapsPath();
279 agentData.child = false; 279 agentData.child = false;
280 agentData.circuitcode = (uint)(Util.RandomClass.Next()); 280 agentData.circuitcode = (uint)(Util.RandomClass.Next());
281 agentData.firstname = FirstName; 281 agentData.firstname = FirstName;
282 agentData.lastname = LastName; 282 agentData.lastname = LastName;
283 agentData.SecureSessionID=LLUUID.Random(); 283 agentData.SecureSessionID=UUID.Random();
284 agentData.SessionID=LLUUID.Random(); 284 agentData.SessionID=UUID.Random();
285 agentData.startpos = new LLVector3(128f, 128f, 100f); 285 agentData.startpos = new Vector3(128f, 128f, 100f);
286 286
287 // Pre-Fill our region cache with information on the agent. 287 // Pre-Fill our region cache with information on the agent.
288 UserAgentData useragent = new UserAgentData(); 288 UserAgentData useragent = new UserAgentData();
@@ -308,14 +308,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
308 userProfile.CurrentAgent = useragent; 308 userProfile.CurrentAgent = useragent;
309 userProfile.CustomType = "OGP"; 309 userProfile.CustomType = "OGP";
310 userProfile.FirstLifeAboutText = "I'm testing OpenGrid Protocol"; 310 userProfile.FirstLifeAboutText = "I'm testing OpenGrid Protocol";
311 userProfile.FirstLifeImage = LLUUID.Zero; 311 userProfile.FirstLifeImage = UUID.Zero;
312 userProfile.FirstName = agentData.firstname; 312 userProfile.FirstName = agentData.firstname;
313 userProfile.GodLevel = 0; 313 userProfile.GodLevel = 0;
314 userProfile.HomeLocation = agentData.startpos; 314 userProfile.HomeLocation = agentData.startpos;
315 userProfile.HomeLocationX = agentData.startpos.X; 315 userProfile.HomeLocationX = agentData.startpos.X;
316 userProfile.HomeLocationY = agentData.startpos.Y; 316 userProfile.HomeLocationY = agentData.startpos.Y;
317 userProfile.HomeLocationZ = agentData.startpos.Z; 317 userProfile.HomeLocationZ = agentData.startpos.Z;
318 userProfile.HomeLookAt = LLVector3.Zero; 318 userProfile.HomeLookAt = Vector3.Zero;
319 userProfile.HomeLookAtX = userProfile.HomeLookAt.X; 319 userProfile.HomeLookAtX = userProfile.HomeLookAt.X;
320 userProfile.HomeLookAtY = userProfile.HomeLookAt.Y; 320 userProfile.HomeLookAtY = userProfile.HomeLookAt.Y;
321 userProfile.HomeLookAtZ = userProfile.HomeLookAt.Z; 321 userProfile.HomeLookAtZ = userProfile.HomeLookAt.Z;
@@ -324,18 +324,18 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
324 userProfile.HomeRegionX = reg.RegionLocX; 324 userProfile.HomeRegionX = reg.RegionLocX;
325 userProfile.HomeRegionY = reg.RegionLocY; 325 userProfile.HomeRegionY = reg.RegionLocY;
326 userProfile.ID = agentData.AgentID; 326 userProfile.ID = agentData.AgentID;
327 userProfile.Image = LLUUID.Zero; 327 userProfile.Image = UUID.Zero;
328 userProfile.LastLogin = Util.UnixTimeSinceEpoch(); 328 userProfile.LastLogin = Util.UnixTimeSinceEpoch();
329 userProfile.Partner = LLUUID.Zero; 329 userProfile.Partner = UUID.Zero;
330 userProfile.PasswordHash = "$1$"; 330 userProfile.PasswordHash = "$1$";
331 userProfile.PasswordSalt = ""; 331 userProfile.PasswordSalt = "";
332 userProfile.RootInventoryFolderID = LLUUID.Zero; 332 userProfile.RootInventoryFolderID = UUID.Zero;
333 userProfile.SurName = agentData.lastname; 333 userProfile.SurName = agentData.lastname;
334 userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL; 334 userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL;
335 userProfile.UserFlags = 0; 335 userProfile.UserFlags = 0;
336 userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL; 336 userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL;
337 userProfile.WantDoMask = 0; 337 userProfile.WantDoMask = 0;
338 userProfile.WebLoginKey = LLUUID.Random(); 338 userProfile.WebLoginKey = UUID.Random();
339 339
340 // Do caps registration 340 // Do caps registration
341 // get seed cap 341 // get seed cap
@@ -348,7 +348,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
348 348
349 //string raCap = string.Empty; 349 //string raCap = string.Empty;
350 350
351 LLUUID AvatarRezCapUUID = LLUUID.Random(); 351 UUID AvatarRezCapUUID = UUID.Random();
352 string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar"; 352 string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar";
353 353
354 // Get a reference to the user's cap so we can pull out the Caps Object Path 354 // Get a reference to the user's cap so we can pull out the Caps Object Path
@@ -389,8 +389,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
389 LLSDMap requestMap = (LLSDMap)request; 389 LLSDMap requestMap = (LLSDMap)request;
390 390
391 // take these values to start. There's a few more 391 // take these values to start. There's a few more
392 LLUUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); 392 UUID SecureSessionID=requestMap["secure_session_id"].AsUUID();
393 LLUUID SessionID = requestMap["session_id"].AsUUID(); 393 UUID SessionID = requestMap["session_id"].AsUUID();
394 int circuitcode = requestMap["circuit_code"].AsInteger(); 394 int circuitcode = requestMap["circuit_code"].AsInteger();
395 LLSDArray Parameter = new LLSDArray(); 395 LLSDArray Parameter = new LLSDArray();
396 if (requestMap.ContainsKey("parameter")) 396 if (requestMap.ContainsKey("parameter"))
@@ -401,7 +401,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
401 //int version = 1; 401 //int version = 1;
402 int estateID = 1; 402 int estateID = 1;
403 int parentEstateID = 1; 403 int parentEstateID = 1;
404 LLUUID regionID = LLUUID.Zero; 404 UUID regionID = UUID.Zero;
405 bool visibleToParent = true; 405 bool visibleToParent = true;
406 406
407 for (int i = 0; i < Parameter.Count; i++) 407 for (int i = 0; i < Parameter.Count; i++)
@@ -537,17 +537,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
537 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); 537 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
538 string uuidString = PathArray[2]; 538 string uuidString = PathArray[2];
539 m_log.InfoFormat("[OGP]: Request to Derez avatar with UUID {0}", uuidString); 539 m_log.InfoFormat("[OGP]: Request to Derez avatar with UUID {0}", uuidString);
540 LLUUID userUUID = LLUUID.Zero; 540 UUID userUUID = UUID.Zero;
541 if (Helpers.TryParse(uuidString, out userUUID)) 541 if (UUID.TryParse(uuidString, out userUUID))
542 { 542 {
543 LLUUID RemoteID = uuidString; 543 UUID RemoteID = uuidString;
544 LLUUID LocalID = RemoteID; 544 UUID LocalID = RemoteID;
545 // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds 545 // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds
546 // would be done already.. but the client connects with the Aditi UUID 546 // would be done already.. but the client connects with the Aditi UUID
547 // regardless over the UDP stack 547 // regardless over the UDP stack
548 548
549 OGPState userState = GetOGPState(LocalID); 549 OGPState userState = GetOGPState(LocalID);
550 if (userState.agent_id != LLUUID.Zero) 550 if (userState.agent_id != UUID.Zero)
551 { 551 {
552 //LLSDMap outboundRequestMap = new LLSDMap(); 552 //LLSDMap outboundRequestMap = new LLSDMap();
553 LLSDMap inboundRequestMap = (LLSDMap)request; 553 LLSDMap inboundRequestMap = (LLSDMap)request;
@@ -592,7 +592,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
592 int rrX = rezResponseMap["region_x"].AsInteger(); 592 int rrX = rezResponseMap["region_x"].AsInteger();
593 int rrY = rezResponseMap["region_y"].AsInteger(); 593 int rrY = rezResponseMap["region_y"].AsInteger();
594 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); 594 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
595 LLUUID rrRID = rezResponseMap["region_id"].AsUUID(); 595 UUID rrRID = rezResponseMap["region_id"].AsUUID();
596 596
597 string rrAccess = rezResponseMap["sim_access"].AsString(); 597 string rrAccess = rezResponseMap["sim_access"].AsString();
598 598
@@ -802,12 +802,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
802 OGPState returnState = new OGPState(); 802 OGPState returnState = new OGPState();
803 returnState.first_name = ""; 803 returnState.first_name = "";
804 returnState.last_name = ""; 804 returnState.last_name = "";
805 returnState.agent_id = LLUUID.Zero; 805 returnState.agent_id = UUID.Zero;
806 returnState.local_agent_id = LLUUID.Zero; 806 returnState.local_agent_id = UUID.Zero;
807 returnState.region_id = LLUUID.Zero; 807 returnState.region_id = UUID.Zero;
808 returnState.circuit_code = 0; 808 returnState.circuit_code = 0;
809 returnState.secure_session_id = LLUUID.Zero; 809 returnState.secure_session_id = UUID.Zero;
810 returnState.session_id = LLUUID.Zero; 810 returnState.session_id = UUID.Zero;
811 returnState.agent_access = true; 811 returnState.agent_access = true;
812 returnState.god_level = 0; 812 returnState.god_level = 0;
813 returnState.god_overide = false; 813 returnState.god_overide = false;
@@ -827,7 +827,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
827 return returnState; 827 return returnState;
828 } 828 }
829 829
830 private OGPState GetOGPState(LLUUID agentId) 830 private OGPState GetOGPState(UUID agentId)
831 { 831 {
832 lock (m_OGPState) 832 lock (m_OGPState)
833 { 833 {
@@ -842,7 +842,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
842 } 842 }
843 } 843 }
844 844
845 public void DeleteOGPState(LLUUID agentId) 845 public void DeleteOGPState(UUID agentId)
846 { 846 {
847 lock (m_OGPState) 847 lock (m_OGPState)
848 { 848 {
@@ -851,7 +851,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
851 } 851 }
852 } 852 }
853 853
854 private void UpdateOGPState(LLUUID agentId, OGPState state) 854 private void UpdateOGPState(UUID agentId, OGPState state)
855 { 855 {
856 lock (m_OGPState) 856 lock (m_OGPState)
857 { 857 {
@@ -866,7 +866,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
866 } 866 }
867 } 867 }
868 868
869 public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod) 869 public void ShutdownConnection(UUID avatarId, OpenGridProtocolModule mod)
870 { 870 {
871 Scene homeScene = GetRootScene(); 871 Scene homeScene = GetRootScene();
872 ScenePresence avatar = null; 872 ScenePresence avatar = null;
@@ -905,7 +905,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
905 905
906 public void ShutdownNoLogout() 906 public void ShutdownNoLogout()
907 { 907 {
908 LLUUID avUUID = LLUUID.Zero; 908 UUID avUUID = UUID.Zero;
909 909
910 if (avToBeKilled != null) 910 if (avToBeKilled != null)
911 { 911 {