From 08d5d10d62df2c1c418e7a39cadb6662ea66b228 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 11 Apr 2007 14:14:19 +0000 Subject: * Started on converting UserHTTPServer to BaseHttpServer * Added a 'param' param to the RestMethod * Added RestHandlerEntry to store more info about the 'rest' handler --- OpenGridServices.UserServer/UserHttp.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'OpenGridServices.UserServer/UserHttp.cs') diff --git a/OpenGridServices.UserServer/UserHttp.cs b/OpenGridServices.UserServer/UserHttp.cs index e1385f7..191fccb 100644 --- a/OpenGridServices.UserServer/UserHttp.cs +++ b/OpenGridServices.UserServer/UserHttp.cs @@ -52,6 +52,10 @@ namespace OpenGridServices.UserServer public UserHTTPServer() : base( 8002 ) { + } + + public void Start() + { MainConsole.Instance.WriteLine("Starting up HTTP Server"); HTTPD = new Thread(new ThreadStart(StartHTTP)); HTTPD.Start(); @@ -89,21 +93,13 @@ namespace OpenGridServices.UserServer switch (req_type) { case "usersessions": - LLUUID sessionid = new LLUUID(rest_params[2]); // get usersessions/sessionid + string param = rest_params[2]; + string result = ""; if (www_req.HttpMethod == "DELETE") { - foreach (libsecondlife.LLUUID UUID in OpenUser_Main.userserver._profilemanager.UserProfiles.Keys) - { - if (OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSessionID == sessionid) - { - OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSessionID = null; - OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSecureSessionID = null; - OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].Circuits.Clear(); - } - } - + result = OpenUser_Main.userserver._profilemanager.RestDeleteUserSessionMethod( null, null, param ); } - return "OK"; + return result; } return ""; -- cgit v1.1