aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/GridService
diff options
context:
space:
mode:
authorMelanie2011-02-07 22:26:09 +0100
committerMelanie2011-02-07 22:26:09 +0100
commit8c20f94939347d504c175ca7afb6b456188cdf2c (patch)
treec11023fbc6e701b44128d2b54bd024abd912a1b3 /OpenSim/Services/GridService
parentPrevent a nonexistent inventory item from throwing an exception (diff)
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC-8c20f94939347d504c175ca7afb6b456188cdf2c.zip
opensim-SC-8c20f94939347d504c175ca7afb6b456188cdf2c.tar.gz
opensim-SC-8c20f94939347d504c175ca7afb6b456188cdf2c.tar.bz2
opensim-SC-8c20f94939347d504c175ca7afb6b456188cdf2c.tar.xz
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services/GridService')
-rw-r--r--OpenSim/Services/GridService/GridService.cs2
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs44
2 files changed, 10 insertions, 36 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 125c2be..aeff9b5 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -286,7 +286,7 @@ namespace OpenSim.Services.GridService
286 } 286 }
287 287
288 } 288 }
289 m_log.DebugFormat("[GRID SERVICE]: region {0} has {1} neighours", region.RegionName, rinfos.Count); 289 m_log.DebugFormat("[GRID SERVICE]: region {0} has {1} neighbours", region.RegionName, rinfos.Count);
290 return rinfos; 290 return rinfos;
291 } 291 }
292 292
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index c02c813..e0d8103 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -180,44 +180,18 @@ namespace OpenSim.Services.GridService
180 public GridRegion TryLinkRegionToCoords(UUID scopeID, string mapName, int xloc, int yloc, UUID ownerID, out string reason) 180 public GridRegion TryLinkRegionToCoords(UUID scopeID, string mapName, int xloc, int yloc, UUID ownerID, out string reason)
181 { 181 {
182 reason = string.Empty; 182 reason = string.Empty;
183 string host = "127.0.0.1";
184 string portstr;
185 string regionName = "";
186 uint port = 0; 183 uint port = 0;
187 string[] parts = mapName.Split(new char[] { ':' }); 184 string[] parts = mapName.Split(new char[] {':'});
188 if (parts.Length >= 1) 185 string regionName = String.Empty;
186 if (parts.Length > 1)
189 { 187 {
190 host = parts[0]; 188 regionName = mapName.Substring(parts[0].Length + 1);
189 regionName = regionName.Trim(new char[] {'"'});
191 } 190 }
192 if (parts.Length >= 2)
193 {
194 portstr = parts[1];
195 //m_log.Debug("-- port = " + portstr);
196 if (!UInt32.TryParse(portstr, out port))
197 regionName = parts[1];
198 }
199 // always take the last one
200 if (parts.Length >= 3)
201 {
202 regionName = parts[2];
203 }
204
205 //// Sanity check.
206 //try
207 //{
208 // Util.GetHostFromDNS(host);
209 //}
210 //catch
211 //{
212 // reason = "Malformed hostname";
213 // return null;
214 //}
215
216 GridRegion regInfo; 191 GridRegion regInfo;
217 bool success = TryCreateLink(scopeID, xloc, yloc, regionName, port, host, ownerID, out regInfo, out reason); 192 if (TryCreateLink(scopeID, xloc, yloc, regionName, 0, null, parts[0], ownerID, out regInfo, out reason))
218 if (success)
219 { 193 {
220 regInfo.RegionName = mapName; 194 regInfo.RegionName = mapName;
221 return regInfo; 195 return regInfo;
222 } 196 }
223 197
@@ -313,9 +287,9 @@ namespace OpenSim.Services.GridService
313 287
314 regInfo.RegionID = regionID; 288 regInfo.RegionID = regionID;
315 289
316 if ( externalName == string.Empty ) 290 if (externalName == string.Empty)
317 regInfo.RegionName = regInfo.ServerURI; 291 regInfo.RegionName = regInfo.ServerURI;
318 else 292 else
319 regInfo.RegionName = externalName; 293 regInfo.RegionName = externalName;
320 294
321 m_log.Debug("[HYPERGRID LINKER]: naming linked region " + regInfo.RegionName); 295 m_log.Debug("[HYPERGRID LINKER]: naming linked region " + regInfo.RegionName);