More authentication stuff

zircon^2
gareth 2007-05-19 12:00:38 +00:00
parent e2499fbbc1
commit e6b3c83b7d
1 changed files with 14 additions and 3 deletions

View File

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using Nwc.XmlRpc;
using System.Threading;
using libsecondlife;
namespace OpenGrid.Framework.Manager {
@ -18,9 +19,19 @@ namespace OpenGrid.Framework.Manager {
XmlRpcResponse response = new XmlRpcResponse();
Hashtable requestData = (Hashtable)request.Params[0];
Hashtable responseData = new Hashtable();
responseData["msg"]="Shutdown command accepted";
(new Thread(new ThreadStart(ZOMGServerIsNowTerminallyIll))).Start();
if(requestData.ContainsKey("session_id")) {
if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) {
responseData["msg"]="Shutdown command accepted";
(new Thread(new ThreadStart(ZOMGServerIsNowTerminallyIll))).Start();
} else {
response.IsFault=true;
responseData["error"]="bad session ID";
}
} else {
response.IsFault=true;
responseData["error"]="no session ID";
}
response.Value = responseData;
return response;