diff options
author | Justin Clarke Casey | 2008-03-26 18:06:29 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-03-26 18:06:29 +0000 |
commit | 14ee78b3af6d5e0a12ead9a7c62bbc54f5d0ac7e (patch) | |
tree | 21e2f4911001ab1541b34e0b9c3a2dc0f8cb9b37 /OpenSim/Region/Communications/OGS1 | |
parent | * Increase timeout for initial simulator login from 16 to 30 seconds (diff) | |
download | opensim-SC-14ee78b3af6d5e0a12ead9a7c62bbc54f5d0ac7e.zip opensim-SC-14ee78b3af6d5e0a12ead9a7c62bbc54f5d0ac7e.tar.gz opensim-SC-14ee78b3af6d5e0a12ead9a7c62bbc54f5d0ac7e.tar.bz2 opensim-SC-14ee78b3af6d5e0a12ead9a7c62bbc54f5d0ac7e.tar.xz |
* Tweaking master uuid exception to make it clearer what just went wrong (user server timeout)
* Increasing GetUserProfile requests only to 6 seconds from 3
* Not completely sure what effect this will have, though probably not much
* At some point one will have to accept that if the grid servers are taking many many seconds to respond, running using that grid will not be viable.
* Perhaps there should be a big warning up front if grid request times are slower than n seconds.
Diffstat (limited to 'OpenSim/Region/Communications/OGS1')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 43b3939..79e323a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
106 | } | 106 | } |
107 | else | 107 | else |
108 | { | 108 | { |
109 | m_log.Warn("[INTERGRID]: Got invalid queryID from userServer"); | 109 | m_log.Warn("[OGS1 USER SERVICES]: Got invalid queryID from userServer"); |
110 | } | 110 | } |
111 | return pickerlist; | 111 | return pickerlist; |
112 | } | 112 | } |
@@ -188,13 +188,18 @@ namespace OpenSim.Region.Communications.OGS1 | |||
188 | } | 188 | } |
189 | catch (WebException e) | 189 | catch (WebException e) |
190 | { | 190 | { |
191 | m_log.Warn("Error when trying to fetch Avatar Picker Response: " + | 191 | m_log.Warn("[OGS1 USER SERVICES]: Error when trying to fetch Avatar Picker Response: " + |
192 | e.Message); | 192 | e.Message); |
193 | // Return Empty picker list (no results) | 193 | // Return Empty picker list (no results) |
194 | } | 194 | } |
195 | return pickerlist; | 195 | return pickerlist; |
196 | } | 196 | } |
197 | 197 | ||
198 | /// <summary> | ||
199 | /// Get a user profile from the user server | ||
200 | /// </summary> | ||
201 | /// <param name="avatarID"></param> | ||
202 | /// <returns>null if the request fails</returns> | ||
198 | public UserProfileData GetUserProfile(string name) | 203 | public UserProfileData GetUserProfile(string name) |
199 | { | 204 | { |
200 | try | 205 | try |
@@ -204,19 +209,26 @@ namespace OpenSim.Region.Communications.OGS1 | |||
204 | IList parameters = new ArrayList(); | 209 | IList parameters = new ArrayList(); |
205 | parameters.Add(param); | 210 | parameters.Add(param); |
206 | XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters); | 211 | XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters); |
207 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); | 212 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 6000); |
208 | Hashtable respData = (Hashtable) resp.Value; | 213 | Hashtable respData = (Hashtable) resp.Value; |
209 | 214 | ||
210 | return ConvertXMLRPCDataToUserProfile(respData); | 215 | return ConvertXMLRPCDataToUserProfile(respData); |
211 | } | 216 | } |
212 | catch (WebException e) | 217 | catch (WebException e) |
213 | { | 218 | { |
214 | m_log.Warn("Error when trying to fetch profile data by name from remote user server: " + | 219 | m_log.ErrorFormat( |
215 | e.Message); | 220 | "[OGS1 USER SERVICES]: Error when trying to fetch profile data by name from remote user server: {0}", |
221 | e); | ||
216 | } | 222 | } |
223 | |||
217 | return null; | 224 | return null; |
218 | } | 225 | } |
219 | 226 | ||
227 | /// <summary> | ||
228 | /// Get a user profile from the user server | ||
229 | /// </summary> | ||
230 | /// <param name="avatarID"></param> | ||
231 | /// <returns>null if the request fails</returns> | ||
220 | public UserProfileData GetUserProfile(LLUUID avatarID) | 232 | public UserProfileData GetUserProfile(LLUUID avatarID) |
221 | { | 233 | { |
222 | try | 234 | try |
@@ -226,16 +238,18 @@ namespace OpenSim.Region.Communications.OGS1 | |||
226 | IList parameters = new ArrayList(); | 238 | IList parameters = new ArrayList(); |
227 | parameters.Add(param); | 239 | parameters.Add(param); |
228 | XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters); | 240 | XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters); |
229 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); | 241 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 6000); |
230 | Hashtable respData = (Hashtable) resp.Value; | 242 | Hashtable respData = (Hashtable) resp.Value; |
231 | 243 | ||
232 | return ConvertXMLRPCDataToUserProfile(respData); | 244 | return ConvertXMLRPCDataToUserProfile(respData); |
233 | } | 245 | } |
234 | catch (Exception e) | 246 | catch (Exception e) |
235 | { | 247 | { |
236 | Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + | 248 | m_log.ErrorFormat( |
237 | e.Message); | 249 | "[OGS1 USER SERVICES]: Error when trying to fetch profile data by uuid from remote user server: {0}", |
250 | e); | ||
238 | } | 251 | } |
252 | |||
239 | return null; | 253 | return null; |
240 | } | 254 | } |
241 | 255 | ||
@@ -244,24 +258,40 @@ namespace OpenSim.Region.Communications.OGS1 | |||
244 | // TODO: implement | 258 | // TODO: implement |
245 | } | 259 | } |
246 | 260 | ||
261 | /// <summary> | ||
262 | /// Retrieve the user information for the given master uuid. | ||
263 | /// </summary> | ||
264 | /// <param name="uuid"></param> | ||
265 | /// <returns></returns> | ||
247 | public UserProfileData SetupMasterUser(string firstName, string lastName) | 266 | public UserProfileData SetupMasterUser(string firstName, string lastName) |
248 | { | 267 | { |
249 | return SetupMasterUser(firstName, lastName, String.Empty); | 268 | return SetupMasterUser(firstName, lastName, String.Empty); |
250 | } | 269 | } |
251 | 270 | ||
271 | /// <summary> | ||
272 | /// Retrieve the user information for the given master uuid. | ||
273 | /// </summary> | ||
274 | /// <param name="uuid"></param> | ||
275 | /// <returns></returns> | ||
252 | public UserProfileData SetupMasterUser(string firstName, string lastName, string password) | 276 | public UserProfileData SetupMasterUser(string firstName, string lastName, string password) |
253 | { | 277 | { |
254 | UserProfileData profile = GetUserProfile(firstName, lastName); | 278 | UserProfileData profile = GetUserProfile(firstName, lastName); |
255 | return profile; | 279 | return profile; |
256 | } | 280 | } |
257 | 281 | ||
282 | /// <summary> | ||
283 | /// Retrieve the user information for the given master uuid. | ||
284 | /// </summary> | ||
285 | /// <param name="uuid"></param> | ||
286 | /// <returns></returns> | ||
258 | public UserProfileData SetupMasterUser(LLUUID uuid) | 287 | public UserProfileData SetupMasterUser(LLUUID uuid) |
259 | { | 288 | { |
260 | UserProfileData data = GetUserProfile(uuid); | 289 | UserProfileData data = GetUserProfile(uuid); |
261 | 290 | ||
262 | if (data == null) | 291 | if (data == null) |
263 | { | 292 | { |
264 | throw new Exception("[OGS1 USER SERVICES]: Unknown master user " + uuid); | 293 | throw new Exception( |
294 | "Could not retrieve profile for master user " + uuid + ". User server did not respond to the request."); | ||
265 | } | 295 | } |
266 | 296 | ||
267 | return data; | 297 | return data; |
@@ -497,7 +527,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
497 | } | 527 | } |
498 | catch (WebException e) | 528 | catch (WebException e) |
499 | { | 529 | { |
500 | m_log.Warn("Error when trying to fetch Avatar's friends list: " + | 530 | m_log.Warn("[OGS1 USER SERVICES]: Error when trying to fetch Avatar's friends list: " + |
501 | e.Message); | 531 | e.Message); |
502 | // Return Empty list (no friends) | 532 | // Return Empty list (no friends) |
503 | } | 533 | } |