aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/ServerMain.cs
diff options
context:
space:
mode:
authorKitto Flora2009-09-30 19:07:18 +0200
committerKitto Flora2009-09-30 19:07:18 +0200
commit07df0e0ab0c69633a6afec8d05cccc117656d3d9 (patch)
tree3048cc38b313e255cbf03fa3e2900e28cadc47c9 /OpenSim/Server/ServerMain.cs
parentAnd another merge issue (diff)
parentFix loading modules with alternate configurations and ports into ROBUST. (diff)
downloadopensim-SC-07df0e0ab0c69633a6afec8d05cccc117656d3d9.zip
opensim-SC-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.gz
opensim-SC-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.bz2
opensim-SC-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.xz
Merge branch '0.6.7-post-fixes' into vehicles
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 {