aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Hypergrid
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications/Hypergrid')
-rw-r--r--OpenSim/Region/Communications/Hypergrid/HGGridServices.cs82
1 files changed, 41 insertions, 41 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs
index 0874676..961ecb1 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs
@@ -1,29 +1,29 @@
1/** 1/**
2 * Copyright (c) 2008, Contributors. All rights reserved. 2 * Copyright (c) 2008, Contributors. All rights reserved.
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without modification, 5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met: 6 * are permitted provided that the following conditions are met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright notice, 8 * * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright notice, 10 * * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation 11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution. 12 * and/or other materials provided with the distribution.
13 * * Neither the name of the Organizations nor the names of Individual 13 * * Neither the name of the Organizations nor the names of Individual
14 * Contributors may be used to endorse or promote products derived from 14 * Contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission. 15 * this software without specific prior written permission.
16 * 16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
20 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
22 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 24 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25 * OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THE POSSIBILITY OF SUCH DAMAGE.
26 * 26 *
27 */ 27 */
28 28
29 29
@@ -73,11 +73,11 @@ namespace OpenSim.Region.Communications.Hypergrid
73 public BaseHttpServer httpServer; 73 public BaseHttpServer httpServer;
74 74
75 protected List<RegionInfo> m_regionsOnInstance = new List<RegionInfo>(); 75 protected List<RegionInfo> m_regionsOnInstance = new List<RegionInfo>();
76 76
77 // Hyperlink regions are hyperlinks on the map 77 // Hyperlink regions are hyperlinks on the map
78 protected List<RegionInfo> m_hyperlinkRegions = new List<RegionInfo>(); 78 protected List<RegionInfo> m_hyperlinkRegions = new List<RegionInfo>();
79 79
80 // Known regions are home regions of visiting foreign users. 80 // Known regions are home regions of visiting foreign users.
81 // They are not on the map as static hyperlinks. They are dynamic hyperlinks, they go away when 81 // They are not on the map as static hyperlinks. They are dynamic hyperlinks, they go away when
82 // the visitor goes away. They are mapped to X=0 on the map. 82 // the visitor goes away. They are mapped to X=0 on the map.
83 // This is key-ed on agent ID 83 // This is key-ed on agent ID
@@ -326,13 +326,13 @@ namespace OpenSim.Region.Communications.Hypergrid
326 //Console.WriteLine("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width); 326 //Console.WriteLine("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width);
327 byte[] imageData = OpenJPEG.EncodeFromImage(m, true); 327 byte[] imageData = OpenJPEG.EncodeFromImage(m, true);
328 AssetBase ass = new AssetBase(UUID.Random(), "region " + info.RegionID.ToString()); 328 AssetBase ass = new AssetBase(UUID.Random(), "region " + info.RegionID.ToString());
329 info.RegionSettings.TerrainImageID = ass.FullID; 329 info.RegionSettings.TerrainImageID = ass.Metadata.FullID;
330 ass.Type = (int)AssetType.Texture; 330 ass.Metadata.Type = (int)AssetType.Texture;
331 ass.Temporary = false; 331 ass.Metadata.Temporary = false;
332 //imageData.CopyTo(ass.Data, 0); 332 //imageData.CopyTo(ass.Data, 0);
333 ass.Data = imageData; 333 ass.Data = imageData;
334 m_assetcache.AddAsset(ass); 334 m_assetcache.AddAsset(ass);
335 335
336 } 336 }
337 catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke 337 catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke
338 { 338 {
@@ -342,7 +342,7 @@ namespace OpenSim.Region.Communications.Hypergrid
342 342
343 // A little ugly, since this code is exactly the same as OSG1's, and we're already 343 // A little ugly, since this code is exactly the same as OSG1's, and we're already
344 // calling that for when the region in in grid mode... (for the grid regions) 344 // calling that for when the region in in grid mode... (for the grid regions)
345 // 345 //
346 public virtual LandData RequestLandData (ulong regionHandle, uint x, uint y) 346 public virtual LandData RequestLandData (ulong regionHandle, uint x, uint y)
347 { 347 {
348 m_log.DebugFormat("[HGrid]: requests land data in {0}, at {1}, {2}", 348 m_log.DebugFormat("[HGrid]: requests land data in {0}, at {1}, {2}",
@@ -542,23 +542,23 @@ namespace OpenSim.Region.Communications.Hypergrid
542 m_log.Info("[HGrid]: InformRegionOfUser: Local grid region " + regInfo.regionSecret); 542 m_log.Info("[HGrid]: InformRegionOfUser: Local grid region " + regInfo.regionSecret);
543 } 543 }
544 544
545 string capsPath = agentData.CapsPath; 545 string capsPath = agentData.CapsPath;
546 Hashtable loginParams = new Hashtable(); 546 Hashtable loginParams = new Hashtable();
547 loginParams["session_id"] = agentData.SessionID.ToString(); 547 loginParams["session_id"] = agentData.SessionID.ToString();
548 loginParams["secure_session_id"] = agentData.SecureSessionID.ToString(); 548 loginParams["secure_session_id"] = agentData.SecureSessionID.ToString();
549 549
550 loginParams["firstname"] = agentData.firstname; 550 loginParams["firstname"] = agentData.firstname;
551 loginParams["lastname"] = agentData.lastname; 551 loginParams["lastname"] = agentData.lastname;
552 552
553 loginParams["agent_id"] = agentData.AgentID.ToString(); 553 loginParams["agent_id"] = agentData.AgentID.ToString();
554 loginParams["circuit_code"] = agentData.circuitcode.ToString(); 554 loginParams["circuit_code"] = agentData.circuitcode.ToString();
555 loginParams["startpos_x"] = agentData.startpos.X.ToString(); 555 loginParams["startpos_x"] = agentData.startpos.X.ToString();
556 loginParams["startpos_y"] = agentData.startpos.Y.ToString(); 556 loginParams["startpos_y"] = agentData.startpos.Y.ToString();
557 loginParams["startpos_z"] = agentData.startpos.Z.ToString(); 557 loginParams["startpos_z"] = agentData.startpos.Z.ToString();
558 loginParams["caps_path"] = capsPath; 558 loginParams["caps_path"] = capsPath;
559 559
560 CachedUserInfo u = m_userProfileCache.GetUserDetails(agentData.AgentID); 560 CachedUserInfo u = m_userProfileCache.GetUserDetails(agentData.AgentID);
561 if (u != null && u.UserProfile != null) 561 if (u != null && u.UserProfile != null)
562 { 562 {
563 loginParams["region_uuid"] = u.UserProfile.HomeRegionID.ToString(); // This seems to be always Zero 563 loginParams["region_uuid"] = u.UserProfile.HomeRegionID.ToString(); // This seems to be always Zero
564 //Console.WriteLine(" --------- Home Region UUID -------"); 564 //Console.WriteLine(" --------- Home Region UUID -------");
@@ -691,7 +691,7 @@ namespace OpenSim.Region.Communications.Hypergrid
691 691
692 userData.UserServerURI = (string)requestData["userserver_id"]; 692 userData.UserServerURI = (string)requestData["userserver_id"];
693 userData.UserAssetURI = (string)requestData["assetserver_id"]; 693 userData.UserAssetURI = (string)requestData["assetserver_id"];
694 userData.UserInventoryURI = (string)requestData["inventoryserver_id"]; 694 userData.UserInventoryURI = (string)requestData["inventoryserver_id"];
695 695
696 UUID rootID = UUID.Zero; 696 UUID rootID = UUID.Zero;
697 UUID.TryParse((string)requestData["root_folder_id"], out rootID); 697 UUID.TryParse((string)requestData["root_folder_id"], out rootID);
@@ -710,7 +710,7 @@ namespace OpenSim.Region.Communications.Hypergrid
710 710
711 m_log.DebugFormat("[HGrid]: Told by user service to prepare for a connection from {0} {1} {2}", 711 m_log.DebugFormat("[HGrid]: Told by user service to prepare for a connection from {0} {1} {2}",
712 userData.FirstName, userData.SurName, userData.ID); 712 userData.FirstName, userData.SurName, userData.ID);
713 m_log.Debug("[HGrid]: home_address: " + userData.UserHomeAddress + 713 m_log.Debug("[HGrid]: home_address: " + userData.UserHomeAddress +
714 "; home_port: " + userData.UserHomePort + "; remoting: " + userData.UserHomeRemotingPort); 714 "; home_port: " + userData.UserHomePort + "; remoting: " + userData.UserHomeRemotingPort);
715 715
716 716
@@ -926,7 +926,7 @@ namespace OpenSim.Region.Communications.Hypergrid
926 return true; 926 return true;
927 } 927 }
928 928
929 public virtual bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) 929 public virtual bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
930 { 930 {
931 // If we're here, it's because regionHandle is a remote, non-grided region 931 // If we're here, it's because regionHandle is a remote, non-grided region
932 m_log.Info("[HGrid]: InformRegionOfChildAgent for " + regionHandle); 932 m_log.Info("[HGrid]: InformRegionOfChildAgent for " + regionHandle);
@@ -934,7 +934,7 @@ namespace OpenSim.Region.Communications.Hypergrid
934 RegionInfo regInfo = GetHyperlinkRegion(regionHandle); 934 RegionInfo regInfo = GetHyperlinkRegion(regionHandle);
935 if (regInfo == null) 935 if (regInfo == null)
936 return false; 936 return false;
937 937
938 //ulong realHandle = regionHandle; 938 //ulong realHandle = regionHandle;
939 939
940 if (!SendUserInformation(regInfo, agentData)) 940 if (!SendUserInformation(regInfo, agentData))
@@ -1184,7 +1184,7 @@ namespace OpenSim.Region.Communications.Hypergrid
1184 #region Methods triggered by calls from external instances 1184 #region Methods triggered by calls from external instances
1185 1185
1186 /// <summary> 1186 /// <summary>
1187 /// 1187 ///
1188 /// </summary> 1188 /// </summary>
1189 /// <param name="regionHandle"></param> 1189 /// <param name="regionHandle"></param>
1190 /// <param name="agentData"></param> 1190 /// <param name="agentData"></param>
@@ -1192,7 +1192,7 @@ namespace OpenSim.Region.Communications.Hypergrid
1192 public void AdjustUserInformation(AgentCircuitData agentData) 1192 public void AdjustUserInformation(AgentCircuitData agentData)
1193 { 1193 {
1194 CachedUserInfo uinfo = m_userProfileCache.GetUserDetails(agentData.AgentID); 1194 CachedUserInfo uinfo = m_userProfileCache.GetUserDetails(agentData.AgentID);
1195 if ((uinfo != null) && (uinfo.UserProfile != null) && 1195 if ((uinfo != null) && (uinfo.UserProfile != null) &&
1196 (IsLocalUser(uinfo) || !(uinfo.UserProfile is ForeignUserProfileData))) 1196 (IsLocalUser(uinfo) || !(uinfo.UserProfile is ForeignUserProfileData)))
1197 { 1197 {
1198 //Console.WriteLine("---------------> Local User!"); 1198 //Console.WriteLine("---------------> Local User!");
@@ -1232,7 +1232,7 @@ namespace OpenSim.Region.Communications.Hypergrid
1232 if (info.RegionHandle == ihandle) 1232 if (info.RegionHandle == ihandle)
1233 return info; 1233 return info;
1234 } 1234 }
1235 1235
1236 return null; 1236 return null;
1237 } 1237 }
1238 1238
@@ -1250,7 +1250,7 @@ namespace OpenSim.Region.Communications.Hypergrid
1250 ohandle = Convert.ToInt64(info.regionSecret); 1250 ohandle = Convert.ToInt64(info.regionSecret);
1251 m_log.Info("[HGrid] remote region " + ohandle); 1251 m_log.Info("[HGrid] remote region " + ohandle);
1252 } 1252 }
1253 catch 1253 catch
1254 { 1254 {
1255 m_log.Error("[HGrid] Could not convert secret for " + ihandle + " (" + info.regionSecret + ")"); 1255 m_log.Error("[HGrid] Could not convert secret for " + ihandle + " (" + info.regionSecret + ")");
1256 } 1256 }