diff options
author | Melanie | 2009-09-28 22:57:38 +0100 |
---|---|---|
committer | Melanie | 2009-09-28 22:57:38 +0100 |
commit | fe3760e4a2b130a46f2439d9a258255c155f6042 (patch) | |
tree | 6f895e9a28c351a83318af66c6b7da55750f826c /OpenSim/Server/ServerMain.cs | |
parent | Bump version number in post-fixes (diff) | |
parent | Allow the notation config_name@port/dll_name:class_name as a handler spec (diff) | |
download | opensim-SC_OLD-fe3760e4a2b130a46f2439d9a258255c155f6042.zip opensim-SC_OLD-fe3760e4a2b130a46f2439d9a258255c155f6042.tar.gz opensim-SC_OLD-fe3760e4a2b130a46f2439d9a258255c155f6042.tar.bz2 opensim-SC_OLD-fe3760e4a2b130a46f2439d9a258255c155f6042.tar.xz |
Merge branch 'master' into 0.6.7-post-fixes
Conflicts:
OpenSim/Framework/Servers/VersionInfo.cs
Diffstat (limited to 'OpenSim/Server/ServerMain.cs')
-rw-r--r-- | OpenSim/Server/ServerMain.cs | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs index 77dfebb..8851894 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,61 @@ 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 | foreach (string c in conns) |
64 | { | 65 | { |
65 | if (conn == String.Empty) | 66 | if (c == String.Empty) |
66 | continue; | 67 | continue; |
67 | 68 | ||
69 | string configName = String.Empty; | ||
70 | string conn = c; | ||
71 | uint port = 0; | ||
72 | |||
73 | string[] split1 = conn.Split(new char[] {'/'}); | ||
74 | if (split1.Length > 1) | ||
75 | { | ||
76 | conn = split1[1]; | ||
77 | |||
78 | string[] split2 = split1[0].Split(new char[] {'@'}); | ||
79 | if (split2.Length > 1) | ||
80 | { | ||
81 | configName = split2[0]; | ||
82 | port = Convert.ToUInt32(split2[1]); | ||
83 | } | ||
84 | else | ||
85 | { | ||
86 | port = Convert.ToUInt32(split1[0]); | ||
87 | } | ||
88 | } | ||
68 | string[] parts = conn.Split(new char[] {':'}); | 89 | string[] parts = conn.Split(new char[] {':'}); |
69 | string friendlyName = parts[0]; | 90 | string friendlyName = parts[0]; |
70 | if (parts.Length > 1) | 91 | if (parts.Length > 1) |
71 | friendlyName = parts[1]; | 92 | friendlyName = parts[1]; |
72 | 93 | ||
94 | IHttpServer server = m_Server.HttpServer; | ||
95 | if (port != 0) | ||
96 | server = m_Server.GetHttpServer(port); | ||
97 | |||
73 | m_log.InfoFormat("[SERVER]: Loading {0}", friendlyName); | 98 | m_log.InfoFormat("[SERVER]: Loading {0}", friendlyName); |
74 | 99 | ||
75 | Object[] modargs = new Object[] { m_Server.Config, m_Server.HttpServer }; | 100 | IServiceConnector connector = null; |
76 | IServiceConnector connector = | 101 | try |
77 | ServerUtils.LoadPlugin<IServiceConnector>(conn, | 102 | { |
78 | modargs); | 103 | Object[] modargs = new Object[] { m_Server.Config, server, |
104 | configName }; | ||
105 | connector = ServerUtils.LoadPlugin<IServiceConnector>(conn, | ||
106 | modargs); | ||
107 | |||
108 | if (connector == null) | ||
109 | { | ||
110 | modargs = new Object[] { m_Server.Config, server }; | ||
111 | connector = | ||
112 | ServerUtils.LoadPlugin<IServiceConnector>(conn, | ||
113 | modargs); | ||
114 | } | ||
115 | } | ||
116 | catch (Exception) | ||
117 | { | ||
118 | } | ||
79 | 119 | ||
80 | if (connector != null) | 120 | if (connector != null) |
81 | { | 121 | { |