aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local/LocalLoginService.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-08-26 03:07:24 +0000
committerTeravus Ovares2008-08-26 03:07:24 +0000
commit9f635e354bea7b4b211012959e585ce7fa25cf3c (patch)
treefde2931e7854d83bf05402bbb39bcc501765bbc5 /OpenSim/Region/Communications/Local/LocalLoginService.cs
parent* minor: zap some more compilation warnings (diff)
downloadopensim-SC_OLD-9f635e354bea7b4b211012959e585ce7fa25cf3c.zip
opensim-SC_OLD-9f635e354bea7b4b211012959e585ce7fa25cf3c.tar.gz
opensim-SC_OLD-9f635e354bea7b4b211012959e585ce7fa25cf3c.tar.bz2
opensim-SC_OLD-9f635e354bea7b4b211012959e585ce7fa25cf3c.tar.xz
* Fixed a bug that occurred if your home region wasn't logged in, in standalone. It wouldn't let you in even if your destination region is online with a 'region x not found' message.
* The purpose of the check was to ensure that your home region was sent to your client properly when you connected. However, the desired result is that if the home region is down, but the destination region is online, the user should still get in. * Changes: if the home region isn't available, set the message to the client so that the home region is the destination region.
Diffstat (limited to 'OpenSim/Region/Communications/Local/LocalLoginService.cs')
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs42
1 files changed, 30 insertions, 12 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 864d58c..aeb9ae0 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -183,19 +183,37 @@ namespace OpenSim.Region.Communications.Local
183 RegionInfo homeReg = m_Parent.GridService.RequestNeighbourInfo(theUser.HomeRegion); 183 RegionInfo homeReg = m_Parent.GridService.RequestNeighbourInfo(theUser.HomeRegion);
184 RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion); 184 RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion);
185 185
186 if ((homeReg != null) && (reg != null)) 186 if ((homeReg != null) || (reg != null))
187 { 187 {
188 response.Home = "{'region_handle':[r" + 188 if (homeReg != null)
189 (homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" + 189 {
190 (homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " + 190 response.Home = "{'region_handle':[r" +
191 "'position':[r" + 191 (homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" +
192 theUser.HomeLocation.X.ToString() + ",r" + 192 (homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " +
193 theUser.HomeLocation.Y.ToString() + ",r" + 193 "'position':[r" +
194 theUser.HomeLocation.Z.ToString() + "], " + 194 theUser.HomeLocation.X.ToString() + ",r" +
195 "'look_at':[r" + 195 theUser.HomeLocation.Y.ToString() + ",r" +
196 theUser.HomeLocation.X.ToString() + ",r" + 196 theUser.HomeLocation.Z.ToString() + "], " +
197 theUser.HomeLocation.Y.ToString() + ",r" + 197 "'look_at':[r" +
198 theUser.HomeLocation.Z.ToString() + "]}"; 198 theUser.HomeLocation.X.ToString() + ",r" +
199 theUser.HomeLocation.Y.ToString() + ",r" +
200 theUser.HomeLocation.Z.ToString() + "]}";
201 }
202 else
203 {
204 m_log.Warn("[LOGIN]: Your home region doesn't exist");
205 response.Home = "{'region_handle':[r" +
206 (reg.RegionLocX * Constants.RegionSize).ToString() + ",r" +
207 (reg.RegionLocY * Constants.RegionSize).ToString() + "], " +
208 "'position':[r" +
209 theUser.HomeLocation.X.ToString() + ",r" +
210 theUser.HomeLocation.Y.ToString() + ",r" +
211 theUser.HomeLocation.Z.ToString() + "], " +
212 "'look_at':[r" +
213 theUser.HomeLocation.X.ToString() + ",r" +
214 theUser.HomeLocation.Y.ToString() + ",r" +
215 theUser.HomeLocation.Z.ToString() + "]}";
216 }
199 string capsPath = Util.GetRandomCapsPath(); 217 string capsPath = Util.GetRandomCapsPath();
200 response.SimAddress = reg.ExternalEndPoint.Address.ToString(); 218 response.SimAddress = reg.ExternalEndPoint.Address.ToString();
201 response.SimPort = (uint) reg.ExternalEndPoint.Port; 219 response.SimPort = (uint) reg.ExternalEndPoint.Port;