aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer')
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs38
1 files changed, 33 insertions, 5 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index b85ece9..6cc34d5 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -64,6 +64,8 @@ namespace OpenSim.Grid.UserServer
64 m_config = config; 64 m_config = config;
65 } 65 }
66 66
67
68
67 /// <summary> 69 /// <summary>
68 /// Customises the login response and fills in missing values. 70 /// Customises the login response and fills in missing values.
69 /// </summary> 71 /// </summary>
@@ -95,11 +97,34 @@ namespace OpenSim.Grid.UserServer
95 } 97 }
96 else 98 else
97 { 99 {
98 // TODO: Parse out startlocationrequest string in the format; 'uri:RegionName&X&Y&Z' 100 string[] startLocationRequestParsed = Util.ParseStartLocationRequest(startLocationRequest);
99 SimInfo = 101 m_log.Info("[DEBUGLOGINPARSE]: 1:" + startLocationRequestParsed[0] + ", 2:" + startLocationRequestParsed[1] + ", 3:" + startLocationRequestParsed[2] + ", 4:" + startLocationRequestParsed[3]);
102 if (startLocationRequestParsed[0] == "last")
103 {
104 // TODO: Parse out startlocationrequest string in the format; 'uri:RegionName&X&Y&Z'
105 SimInfo =
106 RegionProfileData.RequestSimProfileData(
107 theUser.currentAgent.currentHandle, m_config.GridServerURL,
108 m_config.GridSendKey, m_config.GridRecvKey);
109 }
110 else
111 {
112 m_log.Info("[LOGIN]: Looking up Sim: " + startLocationRequestParsed[0]);
113 SimInfo =
100 RegionProfileData.RequestSimProfileData( 114 RegionProfileData.RequestSimProfileData(
101 theUser.currentAgent.currentHandle, m_config.GridServerURL, 115 startLocationRequestParsed[0], m_config.GridServerURL,
102 m_config.GridSendKey, m_config.GridRecvKey); 116 m_config.GridSendKey, m_config.GridRecvKey);
117
118 if (SimInfo == null)
119 {
120 m_log.Info("[LOGIN]: Didn't find region with a close name match sending to home location");
121 SimInfo =
122 RegionProfileData.RequestSimProfileData(
123 theUser.homeRegion, m_config.GridServerURL,
124 m_config.GridSendKey, m_config.GridRecvKey);
125 }
126
127 }
103 } 128 }
104 129
105 // Customise the response 130 // Customise the response
@@ -132,6 +157,9 @@ namespace OpenSim.Grid.UserServer
132 //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + 157 //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " +
133 //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); 158 //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY);
134 159
160 theUser.currentAgent.currentRegion = SimInfo.UUID;
161 theUser.currentAgent.currentHandle = SimInfo.regionHandle;
162
135 // Prepare notification 163 // Prepare notification
136 Hashtable SimParams = new Hashtable(); 164 Hashtable SimParams = new Hashtable();
137 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); 165 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
@@ -149,8 +177,7 @@ namespace OpenSim.Grid.UserServer
149 SendParams.Add(SimParams); 177 SendParams.Add(SimParams);
150 178
151 // Update agent with target sim 179 // Update agent with target sim
152 theUser.currentAgent.currentRegion = SimInfo.UUID; 180
153 theUser.currentAgent.currentHandle = SimInfo.regionHandle;
154 181
155 m_log.Info("[LOGIN]: Telling " 182 m_log.Info("[LOGIN]: Telling "
156 + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + 183 + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
@@ -175,6 +202,7 @@ namespace OpenSim.Grid.UserServer
175 } 202 }
176 } 203 }
177 catch (Exception) 204 catch (Exception)
205 //catch (System.AccessViolationException)
178 { 206 {
179 tryDefault = true; 207 tryDefault = true;
180 } 208 }