aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.UserServer
diff options
context:
space:
mode:
authorlbsa712007-04-11 14:14:19 +0000
committerlbsa712007-04-11 14:14:19 +0000
commit08d5d10d62df2c1c418e7a39cadb6662ea66b228 (patch)
tree19ac712ff6cc51f0563bc99767fc4331061214a8 /OpenGridServices.UserServer
parentdeleted OpenSim.Terrain.BasicTerrain.dll from the bin folder, don't think the... (diff)
downloadopensim-SC-08d5d10d62df2c1c418e7a39cadb6662ea66b228.zip
opensim-SC-08d5d10d62df2c1c418e7a39cadb6662ea66b228.tar.gz
opensim-SC-08d5d10d62df2c1c418e7a39cadb6662ea66b228.tar.bz2
opensim-SC-08d5d10d62df2c1c418e7a39cadb6662ea66b228.tar.xz
* Started on converting UserHTTPServer to BaseHttpServer
* Added a 'param' param to the RestMethod * Added RestHandlerEntry to store more info about the 'rest' handler
Diffstat (limited to '')
-rw-r--r--OpenGridServices.UserServer/Main.cs6
-rw-r--r--OpenGridServices.UserServer/UserHttp.cs20
2 files changed, 14 insertions, 12 deletions
diff --git a/OpenGridServices.UserServer/Main.cs b/OpenGridServices.UserServer/Main.cs
index 9c128d3..9132a54 100644
--- a/OpenGridServices.UserServer/Main.cs
+++ b/OpenGridServices.UserServer/Main.cs
@@ -97,6 +97,12 @@ namespace OpenGridServices.UserServer
97 97
98 MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting HTTP process"); 98 MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting HTTP process");
99 _httpd = new UserHTTPServer(); 99 _httpd = new UserHTTPServer();
100
101 _httpd.AddXmlRPCHandler("login_to_simulator", _profilemanager.XmlRpcLoginMethod);
102 _httpd.AddRestHandler( "DELETE", "/usersessions/", _profilemanager.RestDeleteUserSessionMethod );
103
104 _httpd.Start();
105
100 } 106 }
101 107
102 108
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
52 52
53 public UserHTTPServer() : base( 8002 ) 53 public UserHTTPServer() : base( 8002 )
54 { 54 {
55 }
56
57 public void Start()
58 {
55 MainConsole.Instance.WriteLine("Starting up HTTP Server"); 59 MainConsole.Instance.WriteLine("Starting up HTTP Server");
56 HTTPD = new Thread(new ThreadStart(StartHTTP)); 60 HTTPD = new Thread(new ThreadStart(StartHTTP));
57 HTTPD.Start(); 61 HTTPD.Start();
@@ -89,21 +93,13 @@ namespace OpenGridServices.UserServer
89 switch (req_type) 93 switch (req_type)
90 { 94 {
91 case "usersessions": 95 case "usersessions":
92 LLUUID sessionid = new LLUUID(rest_params[2]); // get usersessions/sessionid 96 string param = rest_params[2];
97 string result = "";
93 if (www_req.HttpMethod == "DELETE") 98 if (www_req.HttpMethod == "DELETE")
94 { 99 {
95 foreach (libsecondlife.LLUUID UUID in OpenUser_Main.userserver._profilemanager.UserProfiles.Keys) 100 result = OpenUser_Main.userserver._profilemanager.RestDeleteUserSessionMethod( null, null, param );
96 {
97 if (OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSessionID == sessionid)
98 {
99 OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSessionID = null;
100 OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].CurrentSecureSessionID = null;
101 OpenUser_Main.userserver._profilemanager.UserProfiles[UUID].Circuits.Clear();
102 }
103 }
104
105 } 101 }
106 return "OK"; 102 return result;
107 } 103 }
108 104
109 return ""; 105 return "";