diff options
author | gareth | 2007-05-19 12:00:38 +0000 |
---|---|---|
committer | gareth | 2007-05-19 12:00:38 +0000 |
commit | e6b3c83b7d5fe7181f828a1e4af550194aba2bb7 (patch) | |
tree | 0b12fbd6fd2a66f7cf8db9fb64da38dac0272ffa /OpenGrid.Framework.Manager/GridServerManager.cs | |
parent | Number of small changes (diff) | |
download | opensim-SC_OLD-e6b3c83b7d5fe7181f828a1e4af550194aba2bb7.zip opensim-SC_OLD-e6b3c83b7d5fe7181f828a1e4af550194aba2bb7.tar.gz opensim-SC_OLD-e6b3c83b7d5fe7181f828a1e4af550194aba2bb7.tar.bz2 opensim-SC_OLD-e6b3c83b7d5fe7181f828a1e4af550194aba2bb7.tar.xz |
More authentication stuff
Diffstat (limited to 'OpenGrid.Framework.Manager/GridServerManager.cs')
-rw-r--r-- | OpenGrid.Framework.Manager/GridServerManager.cs | 17 |
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; | |||
3 | using System.Collections.Generic; | 3 | using System.Collections.Generic; |
4 | using Nwc.XmlRpc; | 4 | using Nwc.XmlRpc; |
5 | using System.Threading; | 5 | using System.Threading; |
6 | using libsecondlife; | ||
6 | 7 | ||
7 | namespace OpenGrid.Framework.Manager { | 8 | namespace 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; |