diff options
Diffstat (limited to 'OpenSim/Server/Handlers/Web')
-rw-r--r-- | OpenSim/Server/Handlers/Web/WebServerInConnector.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/Server/Handlers/Web/WebServerInConnector.cs b/OpenSim/Server/Handlers/Web/WebServerInConnector.cs index 8c14fde..bc34bae 100644 --- a/OpenSim/Server/Handlers/Web/WebServerInConnector.cs +++ b/OpenSim/Server/Handlers/Web/WebServerInConnector.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Server.Handlers.Web | |||
49 | // This is all slow and clunky, it's not a real web server, just something to use if you don't want a real one. | 49 | // This is all slow and clunky, it's not a real web server, just something to use if you don't want a real one. |
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | private IConfigSource m_Config; | 51 | private IConfigSource m_Config; |
52 | protected MySQLGenericHandler m_Database = null; | 52 | protected MySQLRaw m_database = null; |
53 | private Hashtable mime = new Hashtable(); | 53 | private Hashtable mime = new Hashtable(); |
54 | private Hashtable ssi = new Hashtable(); | 54 | private Hashtable ssi = new Hashtable(); |
55 | 55 | ||
@@ -78,8 +78,9 @@ namespace OpenSim.Server.Handlers.Web | |||
78 | //// TODO - Should do the plugin thing to pick between database backends. | 78 | //// TODO - Should do the plugin thing to pick between database backends. |
79 | //// Or not, we are all using MariaDB anyway. | 79 | //// Or not, we are all using MariaDB anyway. |
80 | // m_Database = LoadPlugin<SQLGenericHandler>(dllName, new Object[] { connString }); | 80 | // m_Database = LoadPlugin<SQLGenericHandler>(dllName, new Object[] { connString }); |
81 | m_Database = new MySQLGenericHandler(connString); | 81 | |
82 | if (m_Database == null) | 82 | m_database = new MySQLRaw(connString); |
83 | if (m_database == null) | ||
83 | throw new Exception("Could not find a storage interface in the given module " + dllName); | 84 | throw new Exception("Could not find a storage interface in the given module " + dllName); |
84 | 85 | ||
85 | mime.Add(".gz", "application/gzip"); | 86 | mime.Add(".gz", "application/gzip"); |
@@ -118,16 +119,16 @@ namespace OpenSim.Server.Handlers.Web | |||
118 | 119 | ||
119 | private Hashtable WebRequestHandler(Hashtable request) | 120 | private Hashtable WebRequestHandler(Hashtable request) |
120 | { | 121 | { |
121 | long locIn = m_Database.GetCount("Presence", "RegionID != '00000000-0000-0000-0000-000000000000'"); // Locals online but not HGing, and HGers in world. | 122 | long locIn = m_database.Count("Presence", "RegionID != '00000000-0000-0000-0000-000000000000'"); // Locals online but not HGing, and HGers in world. |
122 | long HGin = m_Database.GetCount("Presence", "UserID NOT IN (SELECT PrincipalID FROM UserAccounts)"); // HGers in world. | 123 | long HGin = m_database.Count("Presence", "UserID NOT IN (SELECT PrincipalID FROM UserAccounts)"); // HGers in world. |
123 | long locOut = m_Database.GetCount("hg_traveling_data", "GridExternalName != '" + ssi["uri"] + "'"); // Locals that are HGing. | 124 | long locOut = m_database.Count("hg_traveling_data", "GridExternalName != '" + ssi["uri"] + "'"); // Locals that are HGing. |
124 | Hashtable reply = new Hashtable(); | 125 | Hashtable reply = new Hashtable(); |
125 | ssi["members"] = m_Database.GetCount("UserAccounts").ToString(); | 126 | ssi["members"] = m_database.Count("UserAccounts").ToString(); |
126 | ssi["sims"] = m_Database.GetCount("regions").ToString(); | 127 | ssi["sims"] = m_database.Count("regions").ToString(); |
127 | ssi["inworld"] = (locIn - HGin).ToString(); | 128 | ssi["inworld"] = (locIn - HGin).ToString(); |
128 | ssi["outworld"] = locOut.ToString(); | 129 | ssi["outworld"] = locOut.ToString(); |
129 | ssi["hgers"] = HGin.ToString(); | 130 | ssi["hgers"] = HGin.ToString(); |
130 | ssi["month"] = m_Database.GetCount("GridUser", "Login > UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()) - 2419200))").ToString(); | 131 | ssi["month"] = m_database.Count("GridUser", "Login > UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()) - 2419200))").ToString(); |
131 | 132 | ||
132 | string reqpath = (string) request["uri"]; | 133 | string reqpath = (string) request["uri"]; |
133 | string[] query = (string[]) request["querystringkeys"]; | 134 | string[] query = (string[]) request["querystringkeys"]; |