aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2009-01-08 22:01:57 +0000
committerTeravus Ovares2009-01-08 22:01:57 +0000
commitfcc3325f3bbeff204d7e5d779fcd8875d6dd4e10 (patch)
treef80e41ae6e508bcb8ec32c24d3e6f8285756cf7b /OpenSim
parent* Establish placeholder for future TextureSender tests (diff)
downloadopensim-SC-fcc3325f3bbeff204d7e5d779fcd8875d6dd4e10.zip
opensim-SC-fcc3325f3bbeff204d7e5d779fcd8875d6dd4e10.tar.gz
opensim-SC-fcc3325f3bbeff204d7e5d779fcd8875d6dd4e10.tar.bz2
opensim-SC-fcc3325f3bbeff204d7e5d779fcd8875d6dd4e10.tar.xz
* Adds the variables passed to the hashtable BaseHttpServer passes in.
* Null check on Sessions_report.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs7
-rw-r--r--OpenSim/Region/UserStatistics/Sessions_Report.cs26
-rw-r--r--OpenSim/Region/UserStatistics/WebStatsModule.cs12
3 files changed, 32 insertions, 13 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index f69fb5e..66119dc 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -1066,6 +1066,9 @@ namespace OpenSim.Framework.Servers
1066 1066
1067 Hashtable keysvals = new Hashtable(); 1067 Hashtable keysvals = new Hashtable();
1068 Hashtable headervals = new Hashtable(); 1068 Hashtable headervals = new Hashtable();
1069
1070 Hashtable requestVars = new Hashtable();
1071
1069 string host = String.Empty; 1072 string host = String.Empty;
1070 1073
1071 string[] querystringkeys = request.QueryString.AllKeys; 1074 string[] querystringkeys = request.QueryString.AllKeys;
@@ -1079,6 +1082,7 @@ namespace OpenSim.Framework.Servers
1079 foreach (string queryname in querystringkeys) 1082 foreach (string queryname in querystringkeys)
1080 { 1083 {
1081 keysvals.Add(queryname, request.QueryString[queryname]); 1084 keysvals.Add(queryname, request.QueryString[queryname]);
1085 requestVars.Add(queryname, keysvals[queryname]);
1082 } 1086 }
1083 1087
1084 foreach (string headername in rHeaders) 1088 foreach (string headername in rHeaders)
@@ -1091,7 +1095,10 @@ namespace OpenSim.Framework.Servers
1091 { 1095 {
1092 host = (string)headervals["Host"]; 1096 host = (string)headervals["Host"];
1093 } 1097 }
1098
1094 keysvals.Add("headers",headervals); 1099 keysvals.Add("headers",headervals);
1100 keysvals.Add("querystringkeys", querystringkeys);
1101 keysvals.Add("requestvars", requestVars);
1095 1102
1096 if (keysvals.Contains("method")) 1103 if (keysvals.Contains("method"))
1097 { 1104 {
diff --git a/OpenSim/Region/UserStatistics/Sessions_Report.cs b/OpenSim/Region/UserStatistics/Sessions_Report.cs
index ea327be..7a1c5b4 100644
--- a/OpenSim/Region/UserStatistics/Sessions_Report.cs
+++ b/OpenSim/Region/UserStatistics/Sessions_Report.cs
@@ -53,27 +53,31 @@ namespace OpenSim.Region.UserStatistics
53 List<SessionList> lstSessions = new List<SessionList>(); 53 List<SessionList> lstSessions = new List<SessionList>();
54 Hashtable requestvars = (Hashtable) pParams["RequestVars"]; 54 Hashtable requestvars = (Hashtable) pParams["RequestVars"];
55 55
56
56 string puserUUID = string.Empty; 57 string puserUUID = string.Empty;
57 string clientVersionString = string.Empty; 58 string clientVersionString = string.Empty;
58 int queryparams = 0; 59 int queryparams = 0;
59 60
60 if (requestvars.ContainsKey("UserID")) 61 if (requestvars != null)
61 { 62 {
62 UUID testUUID = UUID.Zero; 63 if (requestvars.ContainsKey("UserID"))
63 if (UUID.TryParse(requestvars["UserID"].ToString(), out testUUID))
64 { 64 {
65 puserUUID = requestvars["UserID"].ToString(); 65 UUID testUUID = UUID.Zero;
66 66 if (UUID.TryParse(requestvars["UserID"].ToString(), out testUUID))
67 {
68 puserUUID = requestvars["UserID"].ToString();
69
70 }
67 } 71 }
68 }
69 72
70 if (requestvars.ContainsKey("VersionString")) 73 if (requestvars.ContainsKey("VersionString"))
71 { 74 {
72 UUID testUUID = UUID.Zero; 75 UUID testUUID = UUID.Zero;
73 76
74 clientVersionString = requestvars["VersionString"].ToString(); 77 clientVersionString = requestvars["VersionString"].ToString();
75 78
76 79
80 }
77 } 81 }
78 82
79 lock (dbConn) 83 lock (dbConn)
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs
index efea515..cb3b292 100644
--- a/OpenSim/Region/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs
@@ -203,8 +203,16 @@ namespace OpenSim.Region.UserStatistics
203 IStatsController rep = reports[regpath]; 203 IStatsController rep = reports[regpath];
204 Hashtable repParams = new Hashtable(); 204 Hashtable repParams = new Hashtable();
205 205
206 repParams["RequestVars"] = request["requestvars"]; 206 if (request.ContainsKey("requestvars"))
207 repParams["QueryStringKeys"] = request["querystringkeys"]; 207 repParams["RequestVars"] = request["requestvars"];
208 else
209 repParams["RequestVars"] = new Hashtable();
210
211 if (request.ContainsKey("querystringkeys"))
212 repParams["QueryStringKeys"] = request["querystringkeys"];
213 else
214 repParams["QueryStringKeys"] = new string[0];
215
208 216
209 repParams["DatabaseConnection"] = dbConn; 217 repParams["DatabaseConnection"] = dbConn;
210 repParams["Scenes"] = m_scene; 218 repParams["Scenes"] = m_scene;