diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs index 5e76156ee8..ca1571f474 100755 --- a/OpenSim/Server/Base/HttpServerBase.cs +++ b/OpenSim/Server/Base/HttpServerBase.cs @@ -91,15 +91,15 @@ namespace OpenSim.Server.Base } else { - string cert_path = networkConfig.GetString("cert_path",String.Empty); - if (cert_path == String.Empty) + string cert_path = networkConfig.GetString("cert_path", string.Empty); + if (cert_path == string.Empty) { System.Console.WriteLine("ERROR: Path to X509 certificate is missing, server can't start."); Environment.Exit(1); } - string cert_pass = networkConfig.GetString("cert_pass",String.Empty); - if (cert_pass == String.Empty) + string cert_pass = networkConfig.GetString("cert_pass", string.Empty); + if (cert_pass == string.Empty) { System.Console.WriteLine("ERROR: Password for X509 certificate is missing, server can't start."); Environment.Exit(1); @@ -119,14 +119,14 @@ namespace OpenSim.Server.Base m_log.WarnFormat("[SSL]: External flag is {0}", ssl_external); if (!ssl_external) { - string cert_path = networkConfig.GetString("cert_path",String.Empty); - if ( cert_path == String.Empty ) + string cert_path = networkConfig.GetString("cert_path", string.Empty); + if ( cert_path == string.Empty ) { System.Console.WriteLine("Path to X509 certificate is missing, server can't start."); Thread.CurrentThread.Abort(); } - string cert_pass = networkConfig.GetString("cert_pass",String.Empty); - if ( cert_pass == String.Empty ) + string cert_pass = networkConfig.GetString("cert_pass", string.Empty); + if ( cert_pass == string.Empty ) { System.Console.WriteLine("Password for X509 certificate is missing, server can't start."); Thread.CurrentThread.Abort(); diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs index 41844c09b8..f18e25a684 100644 --- a/OpenSim/Server/ServerMain.cs +++ b/OpenSim/Server/ServerMain.cs @@ -49,9 +49,7 @@ namespace OpenSim.Server MethodBase.GetCurrentMethod().DeclaringType); protected static HttpServerBase m_Server = null; - - protected static List m_ServiceConnectors = - new List(); + protected static List m_ServiceConnectors = new List(); protected static PluginLoader loader; private static bool m_NoVerifyCertChain = false; @@ -80,7 +78,7 @@ namespace OpenSim.Server Culture.SetCurrentCulture(); Culture.SetDefaultCurrentCulture(); - ServicePointManager.DefaultConnectionLimit = 32; + ServicePointManager.DefaultConnectionLimit = 64; ServicePointManager.MaxServicePointIdleTime = 30000; ServicePointManager.Expect100Continue = true; // needed now to suport auto redir without writecache @@ -105,7 +103,7 @@ namespace OpenSim.Server m_NoVerifyCertHostname = serverConfig.GetBoolean("NoVerifyCertHostname", m_NoVerifyCertHostname); - string connList = serverConfig.GetString("ServiceConnectors", String.Empty); + string connList = serverConfig.GetString("ServiceConnectors", string.Empty); registryLocation = serverConfig.GetString("RegistryLocation","."); @@ -113,28 +111,27 @@ namespace OpenSim.Server if (servicesConfig != null) { List servicesList = new List(); - if (connList != String.Empty) + if (!string.IsNullOrEmpty(connList)) servicesList.Add(connList); foreach (string k in servicesConfig.GetKeys()) { string v = servicesConfig.GetString(k); - if (v != String.Empty) + if (!string.IsNullOrEmpty(v)) servicesList.Add(v); } - connList = String.Join(",", servicesList.ToArray()); + connList = string.Join(",", servicesList.ToArray()); } string[] conns = connList.Split(new char[] {',', ' ', '\n', '\r', '\t'}); -// int i = 0; foreach (string c in conns) { - if (c == String.Empty) + if (string.IsNullOrEmpty(c)) continue; - string configName = String.Empty; + string configName = string.Empty; string conn = c; uint port = 0; @@ -173,12 +170,12 @@ namespace OpenSim.Server IServiceConnector connector = null; - Object[] modargs = new Object[] { m_Server.Config, server, configName }; + object[] modargs = new object[] { m_Server.Config, server, configName }; connector = ServerUtils.LoadPlugin(conn, modargs); if (connector == null) { - modargs = new Object[] { m_Server.Config, server }; + modargs = new object[] { m_Server.Config, server }; connector = ServerUtils.LoadPlugin(conn, modargs); } diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index 8bf992c7fd..d61637b6fb 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs @@ -149,11 +149,9 @@ namespace OpenSim.Services.PresenceService { try { - bool inCache = false; - if(!BySessionCache.TryGetValue(sessionID, out PresenceData presence)) + bool inCache = BySessionCache.TryGetValue(sessionID, out PresenceData presence); + if(!inCache) presence = m_Database.Get(sessionID); - else - inCache = true; bool success; if (presence == null) diff --git a/bin/XMLRPC.dll b/bin/XMLRPC.dll index 5d4923c011..2189d09026 100755 Binary files a/bin/XMLRPC.dll and b/bin/XMLRPC.dll differ