aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService/GatekeeperService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs29
1 files changed, 13 insertions, 16 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 05be7b8..4419201 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -123,42 +123,39 @@ namespace OpenSim.Services.HypergridService
123 externalName = m_ExternalName + ((regionName != string.Empty) ? " " + regionName : ""); 123 externalName = m_ExternalName + ((regionName != string.Empty) ? " " + regionName : "");
124 imageURL = string.Empty; 124 imageURL = string.Empty;
125 reason = string.Empty; 125 reason = string.Empty;
126 126 GridRegion region = null;
127 127
128 m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", (regionName == string.Empty)? "default region" : regionName); 128 m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", (regionName == string.Empty)? "default region" : regionName);
129 if (!m_AllowTeleportsToAnyRegion || regionName == string.Empty) 129 if (!m_AllowTeleportsToAnyRegion || regionName == string.Empty)
130 { 130 {
131 List<GridRegion> defs = m_GridService.GetDefaultRegions(m_ScopeID); 131 List<GridRegion> defs = m_GridService.GetDefaultRegions(m_ScopeID);
132 if (defs != null && defs.Count > 0) 132 if (defs != null && defs.Count > 0)
133 m_DefaultGatewayRegion = defs[0];
134
135 try
136 { 133 {
137 regionID = m_DefaultGatewayRegion.RegionID; 134 region = defs[0];
138 regionHandle = m_DefaultGatewayRegion.RegionHandle; 135 m_DefaultGatewayRegion = region;
139 } 136 }
140 catch 137 else
141 { 138 {
142 reason = "Grid setup problem. Try specifying a particular region here."; 139 reason = "Grid setup problem. Try specifying a particular region here.";
143 m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to send information. Please specify a default region for this grid!"); 140 m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to send information. Please specify a default region for this grid!");
144 return false; 141 return false;
145 } 142 }
146
147 return true;
148 } 143 }
149 144 else
150 GridRegion region = m_GridService.GetRegionByName(m_ScopeID, regionName);
151 if (region == null)
152 { 145 {
153 reason = "Region not found"; 146 region = m_GridService.GetRegionByName(m_ScopeID, regionName);
154 return false; 147 if (region == null)
148 {
149 reason = "Region not found";
150 return false;
151 }
155 } 152 }
156 153
157 regionID = region.RegionID; 154 regionID = region.RegionID;
158 regionHandle = region.RegionHandle; 155 regionHandle = region.RegionHandle;
159 string regionimage = "regionImage" + region.RegionID.ToString();
160 regionimage = regionimage.Replace("-", "");
161 156
157 string regionimage = "regionImage" + regionID.ToString();
158 regionimage = regionimage.Replace("-", "");
162 imageURL = region.ServerURI + "index.php?method=" + regionimage; 159 imageURL = region.ServerURI + "index.php?method=" + regionimage;
163 160
164 return true; 161 return true;