diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Interfaces/IGridService.cs | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index f5f1f75..63c6e5f 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -159,13 +159,24 @@ namespace OpenSim.Services.Interfaces | |||
159 | } | 159 | } |
160 | } | 160 | } |
161 | set { | 161 | set { |
162 | if (value.EndsWith("/")) { | 162 | if ( value == null) |
163 | { | ||
164 | m_serverURI = String.Empty; | ||
165 | return; | ||
166 | } | ||
167 | |||
168 | if ( value.EndsWith("/") ) | ||
169 | { | ||
170 | |||
163 | m_serverURI = value; | 171 | m_serverURI = value; |
164 | } else { | 172 | } |
173 | else | ||
174 | { | ||
165 | m_serverURI = value + '/'; | 175 | m_serverURI = value + '/'; |
166 | } | 176 | } |
167 | } | 177 | } |
168 | } | 178 | } |
179 | |||
169 | protected string m_serverURI; | 180 | protected string m_serverURI; |
170 | 181 | ||
171 | /// <summary> | 182 | /// <summary> |
@@ -358,6 +369,13 @@ namespace OpenSim.Services.Interfaces | |||
358 | if (kvp.ContainsKey("regionName")) | 369 | if (kvp.ContainsKey("regionName")) |
359 | RegionName = (string)kvp["regionName"]; | 370 | RegionName = (string)kvp["regionName"]; |
360 | 371 | ||
372 | if (kvp.ContainsKey("access")) | ||
373 | { | ||
374 | byte access = Convert.ToByte((string)kvp["access"]); | ||
375 | Access = access; | ||
376 | Maturity = (int)Util.ConvertAccessLevelToMaturity(access); | ||
377 | } | ||
378 | |||
361 | if (kvp.ContainsKey("flags") && kvp["flags"] != null) | 379 | if (kvp.ContainsKey("flags") && kvp["flags"] != null) |
362 | RegionFlags = (OpenSim.Framework.RegionFlags?)Convert.ToInt32((string)kvp["flags"]); | 380 | RegionFlags = (OpenSim.Framework.RegionFlags?)Convert.ToInt32((string)kvp["flags"]); |
363 | 381 | ||
@@ -394,9 +412,6 @@ namespace OpenSim.Services.Interfaces | |||
394 | if (kvp.ContainsKey("parcelMapTexture")) | 412 | if (kvp.ContainsKey("parcelMapTexture")) |
395 | UUID.TryParse((string)kvp["parcelMapTexture"], out ParcelImage); | 413 | UUID.TryParse((string)kvp["parcelMapTexture"], out ParcelImage); |
396 | 414 | ||
397 | if (kvp.ContainsKey("access")) | ||
398 | Access = Byte.Parse((string)kvp["access"]); | ||
399 | |||
400 | if (kvp.ContainsKey("regionSecret")) | 415 | if (kvp.ContainsKey("regionSecret")) |
401 | RegionSecret =(string)kvp["regionSecret"]; | 416 | RegionSecret =(string)kvp["regionSecret"]; |
402 | 417 | ||
@@ -500,9 +515,13 @@ namespace OpenSim.Services.Interfaces | |||
500 | } | 515 | } |
501 | catch (SocketException e) | 516 | catch (SocketException e) |
502 | { | 517 | { |
503 | throw new Exception( | 518 | /*throw new Exception( |
504 | "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" + | 519 | "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" + |
505 | e + "' attached to this exception", e); | 520 | e + "' attached to this exception", e);*/ |
521 | // Don't throw a fatal exception here, instead, return Null and handle it in the caller. | ||
522 | // Reason is, on systems such as OSgrid it has occured that known hostnames stop | ||
523 | // resolving and thus make surrounding regions crash out with this exception. | ||
524 | return null; | ||
506 | } | 525 | } |
507 | 526 | ||
508 | return new IPEndPoint(ia, m_internalEndPoint.Port); | 527 | return new IPEndPoint(ia, m_internalEndPoint.Port); |
@@ -526,4 +545,4 @@ namespace OpenSim.Services.Interfaces | |||
526 | get { return Util.UIntsToLong((uint)RegionLocX, (uint)RegionLocY); } | 545 | get { return Util.UIntsToLong((uint)RegionLocX, (uint)RegionLocY); } |
527 | } | 546 | } |
528 | } | 547 | } |
529 | } \ No newline at end of file | 548 | } |