aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/ServerMain.cs
diff options
context:
space:
mode:
authorMelanie2009-10-02 08:23:38 +0100
committerMelanie2009-10-02 08:23:38 +0100
commit31d8cec0f8cd47ff445edc7771e5e73825a57927 (patch)
treea2d60604317739fa530502c40ffc71bab2a5c494 /OpenSim/Server/ServerMain.cs
parentRestore the missing image handling to the image manager. The missing (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-31d8cec0f8cd47ff445edc7771e5e73825a57927.zip
opensim-SC_OLD-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.gz
opensim-SC_OLD-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.bz2
opensim-SC_OLD-31d8cec0f8cd47ff445edc7771e5e73825a57927.tar.xz
Merge branch 'master' into diva-textures
Diffstat (limited to 'OpenSim/Server/ServerMain.cs')
-rw-r--r--OpenSim/Server/ServerMain.cs50
1 files changed, 44 insertions, 6 deletions
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs
index 77dfebb..a7b33c9 100644
--- a/OpenSim/Server/ServerMain.cs
+++ b/OpenSim/Server/ServerMain.cs
@@ -30,6 +30,7 @@ using log4net;
30using System.Reflection; 30using System.Reflection;
31using System; 31using System;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using OpenSim.Framework.Servers.HttpServer;
33using OpenSim.Server.Base; 34using OpenSim.Server.Base;
34using OpenSim.Server.Handlers.Base; 35using OpenSim.Server.Handlers.Base;
35 36
@@ -60,22 +61,59 @@ namespace OpenSim.Server
60 string connList = serverConfig.GetString("ServiceConnectors", String.Empty); 61 string connList = serverConfig.GetString("ServiceConnectors", String.Empty);
61 string[] conns = connList.Split(new char[] {',', ' '}); 62 string[] conns = connList.Split(new char[] {',', ' '});
62 63
63 foreach (string conn in conns) 64 int i = 0;
65 foreach (string c in conns)
64 { 66 {
65 if (conn == String.Empty) 67 if (c == String.Empty)
66 continue; 68 continue;
67 69
70 string configName = String.Empty;
71 string conn = c;
72 uint port = 0;
73
74 string[] split1 = conn.Split(new char[] {'/'});
75 if (split1.Length > 1)
76 {
77 conn = split1[1];
78
79 string[] split2 = split1[0].Split(new char[] {'@'});
80 if (split2.Length > 1)
81 {
82 configName = split2[0];
83 port = Convert.ToUInt32(split2[1]);
84 }
85 else
86 {
87 port = Convert.ToUInt32(split1[0]);
88 }
89 }
68 string[] parts = conn.Split(new char[] {':'}); 90 string[] parts = conn.Split(new char[] {':'});
69 string friendlyName = parts[0]; 91 string friendlyName = parts[0];
70 if (parts.Length > 1) 92 if (parts.Length > 1)
71 friendlyName = parts[1]; 93 friendlyName = parts[1];
72 94
73 m_log.InfoFormat("[SERVER]: Loading {0}", friendlyName); 95 IHttpServer server = m_Server.HttpServer;
96 if (port != 0)
97 server = m_Server.GetHttpServer(port);
74 98
75 Object[] modargs = new Object[] { m_Server.Config, m_Server.HttpServer }; 99 if (port != m_Server.DefaultPort)
76 IServiceConnector connector = 100 m_log.InfoFormat("[SERVER]: Loading {0} on port {1}", friendlyName, port);
77 ServerUtils.LoadPlugin<IServiceConnector>(conn, 101 else
102 m_log.InfoFormat("[SERVER]: Loading {0}", friendlyName);
103
104 IServiceConnector connector = null;
105
106 Object[] modargs = new Object[] { m_Server.Config, server,
107 configName };
108 connector = ServerUtils.LoadPlugin<IServiceConnector>(conn,
78 modargs); 109 modargs);
110 if (connector == null)
111 {
112 modargs = new Object[] { m_Server.Config, server };
113 connector =
114 ServerUtils.LoadPlugin<IServiceConnector>(conn,
115 modargs);
116 }
79 117
80 if (connector != null) 118 if (connector != null)
81 { 119 {