aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGrid.Framework.Manager/GridServerManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGrid.Framework.Manager/GridServerManager.cs')
-rw-r--r--OpenGrid.Framework.Manager/GridServerManager.cs17
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenGrid.Framework.Manager/GridServerManager.cs b/OpenGrid.Framework.Manager/GridServerManager.cs
index 5c39cc1..7ebf66a 100644
--- a/OpenGrid.Framework.Manager/GridServerManager.cs
+++ b/OpenGrid.Framework.Manager/GridServerManager.cs
@@ -3,6 +3,7 @@ using System.Collections;
3using System.Collections.Generic; 3using System.Collections.Generic;
4using Nwc.XmlRpc; 4using Nwc.XmlRpc;
5using System.Threading; 5using System.Threading;
6using libsecondlife;
6 7
7namespace OpenGrid.Framework.Manager { 8namespace OpenGrid.Framework.Manager {
8 9
@@ -18,9 +19,19 @@ namespace OpenGrid.Framework.Manager {
18 XmlRpcResponse response = new XmlRpcResponse(); 19 XmlRpcResponse response = new XmlRpcResponse();
19 Hashtable requestData = (Hashtable)request.Params[0]; 20 Hashtable requestData = (Hashtable)request.Params[0];
20 Hashtable responseData = new Hashtable(); 21 Hashtable responseData = new Hashtable();
21 22
22 responseData["msg"]="Shutdown command accepted"; 23 if(requestData.ContainsKey("session_id")) {
23 (new Thread(new ThreadStart(ZOMGServerIsNowTerminallyIll))).Start(); 24 if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) {
25 responseData["msg"]="Shutdown command accepted";
26 (new Thread(new ThreadStart(ZOMGServerIsNowTerminallyIll))).Start();
27 } else {
28 response.IsFault=true;
29 responseData["error"]="bad session ID";
30 }
31 } else {
32 response.IsFault=true;
33 responseData["error"]="no session ID";
34 }
24 35
25 response.Value = responseData; 36 response.Value = responseData;
26 return response; 37 return response;