aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGridServices')
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/UserManager.cs25
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
index fdda63b..eb98783 100644
--- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
+++ b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
@@ -277,6 +277,21 @@ namespace OpenGridServices.UserServer
277 } 277 }
278 278
279 /// <summary> 279 /// <summary>
280 /// Creates an error response caused by target region being down
281 /// </summary>
282 /// <returns>An XMLRPC Response</returns>
283 private static XmlRpcResponse CreateDeadRegionResponse()
284 {
285 XmlRpcResponse response = new XmlRpcResponse();
286 Hashtable PresenceErrorRespData = new Hashtable();
287 PresenceErrorRespData["reason"] = "key";
288 PresenceErrorRespData["message"] = "The region you are attempting to log into is not responding. Please select another region and try again.";
289 PresenceErrorRespData["login"] = "false";
290 response.Value = PresenceErrorRespData;
291 return response;
292 }
293
294 /// <summary>
280 /// Customises the login response and fills in missing values. 295 /// Customises the login response and fills in missing values.
281 /// </summary> 296 /// </summary>
282 /// <param name="response">The existing response</param> 297 /// <param name="response">The existing response</param>
@@ -560,7 +575,15 @@ namespace OpenGridServices.UserServer
560 responseData["session_id"] = TheUser.currentAgent.sessionID.ToStringHyphenated(); 575 responseData["session_id"] = TheUser.currentAgent.sessionID.ToStringHyphenated();
561 responseData["login"] = "true"; 576 responseData["login"] = "true";
562 577
563 this.CustomiseResponse(ref responseData, ref TheUser); 578 try
579 {
580 this.CustomiseResponse(ref responseData, ref TheUser);
581 }
582 catch (Exception e)
583 {
584 return CreateDeadRegionResponse();
585 Console.WriteLine(e.ToString());
586 }
564 587
565 CommitAgent(ref TheUser); 588 CommitAgent(ref TheUser);
566 589