aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorDiva Canto2010-12-05 19:43:24 -0800
committerDiva Canto2010-12-05 19:43:24 -0800
commit72748746d53df1c033207452a4315d93bc780158 (patch)
treee50bf963b16737946c0717ee42779b2aa5e3ff8d /OpenSim/Services
parentMerge branch 'master-core' into mantis5110 (diff)
downloadopensim-SC-72748746d53df1c033207452a4315d93bc780158.zip
opensim-SC-72748746d53df1c033207452a4315d93bc780158.tar.gz
opensim-SC-72748746d53df1c033207452a4315d93bc780158.tar.bz2
opensim-SC-72748746d53df1c033207452a4315d93bc780158.tar.xz
Fixed some inconsistency with trailing /. Made debug messages consistent. Changed the stored region names of HG regions. Increased the size of regionName in DB.
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs28
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs10
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs4
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs6
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs4
5 files changed, 29 insertions, 23 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 70bafda..85c1380 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -107,8 +107,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
107 } 107 }
108 108
109 hash = (Hashtable)response.Value; 109 hash = (Hashtable)response.Value;
110 foreach (Object o in hash) 110 //foreach (Object o in hash)
111 m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); 111 // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value);
112 try 112 try
113 { 113 {
114 bool success = false; 114 bool success = false;
@@ -116,19 +116,19 @@ namespace OpenSim.Services.Connectors.Hypergrid
116 if (success) 116 if (success)
117 { 117 {
118 UUID.TryParse((string)hash["uuid"], out regionID); 118 UUID.TryParse((string)hash["uuid"], out regionID);
119 m_log.Debug(">> HERE, uuid: " + regionID); 119 //m_log.Debug(">> HERE, uuid: " + regionID);
120 if ((string)hash["handle"] != null) 120 if ((string)hash["handle"] != null)
121 { 121 {
122 realHandle = Convert.ToUInt64((string)hash["handle"]); 122 realHandle = Convert.ToUInt64((string)hash["handle"]);
123 m_log.Debug(">> HERE, realHandle: " + realHandle); 123 //m_log.Debug(">> HERE, realHandle: " + realHandle);
124 } 124 }
125 if (hash["region_image"] != null) { 125 if (hash["region_image"] != null) {
126 imageURL = (string)hash["region_image"]; 126 imageURL = (string)hash["region_image"];
127 m_log.Debug(">> HERE, imageURL: " + imageURL); 127 //m_log.Debug(">> HERE, imageURL: " + imageURL);
128 } 128 }
129 if (hash["external_name"] != null) { 129 if (hash["external_name"] != null) {
130 externalName = (string)hash["external_name"]; 130 externalName = (string)hash["external_name"];
131 m_log.Debug(">> HERE, externalName: " + externalName); 131 //m_log.Debug(">> HERE, externalName: " + externalName);
132 } 132 }
133 } 133 }
134 134
@@ -221,48 +221,48 @@ namespace OpenSim.Services.Connectors.Hypergrid
221 GridRegion region = new GridRegion(); 221 GridRegion region = new GridRegion();
222 222
223 UUID.TryParse((string)hash["uuid"], out region.RegionID); 223 UUID.TryParse((string)hash["uuid"], out region.RegionID);
224 m_log.Debug(">> HERE, uuid: " + region.RegionID); 224 //m_log.Debug(">> HERE, uuid: " + region.RegionID);
225 int n = 0; 225 int n = 0;
226 if (hash["x"] != null) 226 if (hash["x"] != null)
227 { 227 {
228 Int32.TryParse((string)hash["x"], out n); 228 Int32.TryParse((string)hash["x"], out n);
229 region.RegionLocX = n; 229 region.RegionLocX = n;
230 m_log.Debug(">> HERE, x: " + region.RegionLocX); 230 //m_log.Debug(">> HERE, x: " + region.RegionLocX);
231 } 231 }
232 if (hash["y"] != null) 232 if (hash["y"] != null)
233 { 233 {
234 Int32.TryParse((string)hash["y"], out n); 234 Int32.TryParse((string)hash["y"], out n);
235 region.RegionLocY = n; 235 region.RegionLocY = n;
236 m_log.Debug(">> HERE, y: " + region.RegionLocY); 236 //m_log.Debug(">> HERE, y: " + region.RegionLocY);
237 } 237 }
238 if (hash["region_name"] != null) 238 if (hash["region_name"] != null)
239 { 239 {
240 region.RegionName = (string)hash["region_name"]; 240 region.RegionName = (string)hash["region_name"];
241 m_log.Debug(">> HERE, region_name: " + region.RegionName); 241 //m_log.Debug(">> HERE, region_name: " + region.RegionName);
242 } 242 }
243 if (hash["hostname"] != null) { 243 if (hash["hostname"] != null) {
244 region.ExternalHostName = (string)hash["hostname"]; 244 region.ExternalHostName = (string)hash["hostname"];
245 m_log.Debug(">> HERE, hostname: " + region.ExternalHostName); 245 //m_log.Debug(">> HERE, hostname: " + region.ExternalHostName);
246 } 246 }
247 if (hash["http_port"] != null) 247 if (hash["http_port"] != null)
248 { 248 {
249 uint p = 0; 249 uint p = 0;
250 UInt32.TryParse((string)hash["http_port"], out p); 250 UInt32.TryParse((string)hash["http_port"], out p);
251 region.HttpPort = p; 251 region.HttpPort = p;
252 m_log.Debug(">> HERE, http_port: " + region.HttpPort); 252 //m_log.Debug(">> HERE, http_port: " + region.HttpPort);
253 } 253 }
254 if (hash["internal_port"] != null) 254 if (hash["internal_port"] != null)
255 { 255 {
256 int p = 0; 256 int p = 0;
257 Int32.TryParse((string)hash["internal_port"], out p); 257 Int32.TryParse((string)hash["internal_port"], out p);
258 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p); 258 region.InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), p);
259 m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint); 259 //m_log.Debug(">> HERE, internal_port: " + region.InternalEndPoint);
260 } 260 }
261 261
262 if (hash["server_uri"] != null) 262 if (hash["server_uri"] != null)
263 { 263 {
264 region.ServerURI = (string) hash["server_uri"]; 264 region.ServerURI = (string) hash["server_uri"];
265 m_log.Debug(">> HERE, server_uri: " + region.ServerURI); 265 //m_log.Debug(">> HERE, server_uri: " + region.ServerURI);
266 } 266 }
267 267
268 // Successful return 268 // Successful return
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index eed3207..d5d0195 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -127,16 +127,18 @@ namespace OpenSim.Services.GridService
127 127
128 if (MainConsole.Instance != null) 128 if (MainConsole.Instance != null)
129 { 129 {
130 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]", "Link a HyperGrid Region", RunCommand); 130 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
131 "link-region <Xloc> <Yloc> <ServerURI> [<RemoteRegionName>]",
132 "Link a HyperGrid Region", RunCommand);
131 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", 133 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
132 "link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]", 134 "link-region <Xloc> <Yloc> <RegionIP> <RegionPort> [<RemoteRegionName>]",
133 "Link a hypergrid region (deprecated)", RunCommand); 135 "Link a hypergrid region (deprecated)", RunCommand);
134 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region", 136 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "unlink-region",
135 "unlink-region <local name>", 137 "unlink-region <local name>",
136 "Unlink a hypergrid region", RunCommand); 138 "Unlink a hypergrid region", RunCommand);
137 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", 139 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>]",
138 "Set local coordinate to map HG regions to", RunCommand); 140 "Set local coordinate to map HG regions to", RunCommand);
139 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks <cr>", 141 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "show hyperlinks", "show hyperlinks",
140 "List the HG regions", HandleShow); 142 "List the HG regions", HandleShow);
141 } 143 }
142 } 144 }
@@ -281,7 +283,7 @@ namespace OpenSim.Services.GridService
281 else 283 else
282 regInfo.RegionName = externalName; 284 regInfo.RegionName = externalName;
283 285
284 m_log.Debug("naming linked region " + regInfo.RegionName); 286 m_log.Debug("[HYPERGRID LINKER]: naming linked region " + regInfo.RegionName);
285 287
286 // Try get the map image 288 // Try get the map image
287 //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); 289 //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL);
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 10e3aee..05be7b8 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -87,6 +87,8 @@ namespace OpenSim.Services.HypergridService
87 //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); 87 //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
88 m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); 88 m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true);
89 m_ExternalName = serverConfig.GetString("ExternalName", string.Empty); 89 m_ExternalName = serverConfig.GetString("ExternalName", string.Empty);
90 if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/"))
91 m_ExternalName = m_ExternalName + "/";
90 92
91 Object[] args = new Object[] { config }; 93 Object[] args = new Object[] { config };
92 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 94 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
@@ -118,7 +120,7 @@ namespace OpenSim.Services.HypergridService
118 { 120 {
119 regionID = UUID.Zero; 121 regionID = UUID.Zero;
120 regionHandle = 0; 122 regionHandle = 0;
121 externalName = m_ExternalName; 123 externalName = m_ExternalName + ((regionName != string.Empty) ? " " + regionName : "");
122 imageURL = string.Empty; 124 imageURL = string.Empty;
123 reason = string.Empty; 125 reason = string.Empty;
124 126
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 32b4249..3519250 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -101,6 +101,8 @@ namespace OpenSim.Services.HypergridService
101 serverConfig = config.Configs["GatekeeperService"]; 101 serverConfig = config.Configs["GatekeeperService"];
102 m_GridName = serverConfig.GetString("ExternalName", string.Empty); 102 m_GridName = serverConfig.GetString("ExternalName", string.Empty);
103 } 103 }
104 else if (!m_GridName.EndsWith("/"))
105 m_GridName = m_GridName + "/";
104 } 106 }
105 } 107 }
106 108
@@ -152,8 +154,8 @@ namespace OpenSim.Services.HypergridService
152 bool success = false; 154 bool success = false;
153 string myExternalIP = string.Empty; 155 string myExternalIP = string.Empty;
154 string gridName = gatekeeper.ServerURI; 156 string gridName = gatekeeper.ServerURI;
155 157
156 m_log.Debug("m_grid - " + m_GridName + ", gn - " + gridName); 158 m_log.DebugFormat("[USER AGENT SERVICE]: m_grid - {0}, gn - {1}", m_GridName, gridName);
157 159
158 if (m_GridName == gridName) 160 if (m_GridName == gridName)
159 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); 161 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index efc0568..25d80bd 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -586,7 +586,7 @@ namespace OpenSim.Services.LLLoginService
586 586
587 private GridRegion FindForeignRegion(string domainName, uint port, string regionName, out GridRegion gatekeeper) 587 private GridRegion FindForeignRegion(string domainName, uint port, string regionName, out GridRegion gatekeeper)
588 { 588 {
589 m_log.Debug("attempting to findforeignregion " + domainName + ":" + port.ToString() + ":" + regionName); 589 m_log.Debug("[LLLOGIN SERVICE]: attempting to findforeignregion " + domainName + ":" + port.ToString() + ":" + regionName);
590 gatekeeper = new GridRegion(); 590 gatekeeper = new GridRegion();
591 gatekeeper.ExternalHostName = domainName; 591 gatekeeper.ExternalHostName = domainName;
592 gatekeeper.HttpPort = port; 592 gatekeeper.HttpPort = port;
@@ -654,7 +654,7 @@ namespace OpenSim.Services.LLLoginService
654 gatekeeper.HttpPort = (uint)port; 654 gatekeeper.HttpPort = (uint)port;
655 gatekeeper.ServerURI = m_GatekeeperURL; 655 gatekeeper.ServerURI = m_GatekeeperURL;
656 } 656 }
657 m_log.Debug("no gatekeeper detected..... using " + m_GatekeeperURL); 657 m_log.Debug("[LLLOGIN SERVICE]: no gatekeeper detected..... using " + m_GatekeeperURL);
658 } 658 }
659 659
660 bool success = false; 660 bool success = false;