瀏覽代碼

update xmlrpc.dll with a fix for empty base64 case

UbitUmarov 3 年之前
父節點
當前提交
ff1302f8c8
共有 4 個文件被更改,包括 20 次插入25 次删除
  1. 8 8
      OpenSim/Server/Base/HttpServerBase.cs
  2. 10 13
      OpenSim/Server/ServerMain.cs
  3. 2 4
      OpenSim/Services/PresenceService/PresenceService.cs
  4. 二進制
      bin/XMLRPC.dll

+ 8 - 8
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();

+ 10 - 13
OpenSim/Server/ServerMain.cs

@@ -49,9 +49,7 @@ namespace OpenSim.Server
                 MethodBase.GetCurrentMethod().DeclaringType);
 
         protected static HttpServerBase m_Server = null;
-
-        protected static List<IServiceConnector> m_ServiceConnectors =
-                new List<IServiceConnector>();
+        protected static List<IServiceConnector> m_ServiceConnectors = new List<IServiceConnector>();
 
         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<string> servicesList = new List<string>();
-                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<IServiceConnector>(conn, modargs);
 
                 if (connector == null)
                 {
-                    modargs = new Object[] { m_Server.Config, server };
+                    modargs = new object[] { m_Server.Config, server };
                     connector = ServerUtils.LoadPlugin<IServiceConnector>(conn, modargs);
                 }
 

+ 2 - 4
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)

二進制
bin/XMLRPC.dll