aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/ServerMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/ServerMain.cs')
-rw-r--r--OpenSim/Server/ServerMain.cs52
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;
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,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 {