diff options
author | John Hurliman | 2009-09-30 15:28:23 -0700 |
---|---|---|
committer | John Hurliman | 2009-09-30 15:28:23 -0700 |
commit | acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009 (patch) | |
tree | 305349e1bd0a5849fd7f96483e24d5e07b24b8f4 /OpenSim/Server/ServerMain.cs | |
parent | * Adding Scale to EntityBase * Fixing the incorrect initialization of EntityB... (diff) | |
parent | Formatting cleanup. (diff) | |
download | opensim-SC-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.zip opensim-SC-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.gz opensim-SC-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.bz2 opensim-SC-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Server/ServerMain.cs')
-rw-r--r-- | OpenSim/Server/ServerMain.cs | 50 |
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; | |||
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System; | 31 | using System; |
32 | using System.Collections.Generic; | 32 | using System.Collections.Generic; |
33 | using OpenSim.Framework.Servers.HttpServer; | ||
33 | using OpenSim.Server.Base; | 34 | using OpenSim.Server.Base; |
34 | using OpenSim.Server.Handlers.Base; | 35 | using 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 | { |