diff options
author | Melanie | 2011-02-07 22:28:59 +0000 |
---|---|---|
committer | Melanie | 2011-02-07 22:28:59 +0000 |
commit | 6becaf65e15e3fde2d910925b4f7ff09971121f3 (patch) | |
tree | 86ce8b674c9e1559e2b8763e847d2b99e920ef03 /OpenSim/Services | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-6becaf65e15e3fde2d910925b4f7ff09971121f3.zip opensim-SC_OLD-6becaf65e15e3fde2d910925b4f7ff09971121f3.tar.gz opensim-SC_OLD-6becaf65e15e3fde2d910925b4f7ff09971121f3.tar.bz2 opensim-SC_OLD-6becaf65e15e3fde2d910925b4f7ff09971121f3.tar.xz |
Fix merge issues
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/GridService/HypergridLinker.cs | 55 |
1 files changed, 7 insertions, 48 deletions
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 553c116..e0d8103 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -180,60 +180,19 @@ 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 | <<<<<<< HEAD:OpenSim/Services/GridService/HypergridLinker.cs | ||
195 | portstr = parts[1]; | ||
196 | //m_log.Debug("-- port = " + portstr); | ||
197 | if (!UInt32.TryParse(portstr, out port)) | ||
198 | regionName = parts[1]; | ||
199 | } | ||
200 | // always take the last one | ||
201 | if (parts.Length >= 3) | ||
202 | { | ||
203 | regionName = parts[2]; | ||
204 | } | ||
205 | |||
206 | //// Sanity check. | ||
207 | //try | ||
208 | //{ | ||
209 | // Util.GetHostFromDNS(host); | ||
210 | //} | ||
211 | //catch | ||
212 | //{ | ||
213 | // reason = "Malformed hostname"; | ||
214 | // return null; | ||
215 | //} | ||
216 | |||
217 | GridRegion regInfo; | 191 | GridRegion regInfo; |
218 | 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)) |
219 | if (success) | ||
220 | { | 193 | { |
221 | regInfo.RegionName = mapName; | 194 | regInfo.RegionName = mapName; |
222 | return regInfo; | 195 | return regInfo; |
223 | ======= | ||
224 | string[] parts = mapName.Split(new char[] {' '}); | ||
225 | string regionName = String.Empty; | ||
226 | if (parts.Length > 1) | ||
227 | { | ||
228 | regionName = mapName.Substring(parts[0].Length + 1); | ||
229 | regionName = regionName.Trim(new char[] {'"'}); | ||
230 | } | ||
231 | if (TryCreateLink(scopeID, xloc, yloc, regionName, 0, null, parts[0], ownerID, out regInfo, out reason)) | ||
232 | { | ||
233 | regInfo.RegionName = mapName; | ||
234 | return regInfo; | ||
235 | } | ||
236 | >>>>>>> master:OpenSim/Services/GridService/HypergridLinker.cs | ||
237 | } | 196 | } |
238 | 197 | ||
239 | return null; | 198 | return null; |