aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/ServerMain.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-15 02:51:52 +0100
committerJustin Clark-Casey (justincc)2012-06-15 02:51:52 +0100
commit94517c8d5c63f9e8a1ea9a83b04db956f27aa25d (patch)
treeb38f309e24df668dc9b422daf69ce9273e09dee7 /OpenSim/Server/ServerMain.cs
parentAdd main instance to internal MainServer.m_Servers list to simplify internal ... (diff)
downloadopensim-SC_OLD-94517c8d5c63f9e8a1ea9a83b04db956f27aa25d.zip
opensim-SC_OLD-94517c8d5c63f9e8a1ea9a83b04db956f27aa25d.tar.gz
opensim-SC_OLD-94517c8d5c63f9e8a1ea9a83b04db956f27aa25d.tar.bz2
opensim-SC_OLD-94517c8d5c63f9e8a1ea9a83b04db956f27aa25d.tar.xz
Make the "debug http" command available for robust as well as the simulator. This allows one to see incoming requests as they happen.
This required making everything use the common MainServer class for registering and retrieving http servers, rather than duplicate structures.
Diffstat (limited to 'OpenSim/Server/ServerMain.cs')
-rw-r--r--OpenSim/Server/ServerMain.cs26
1 files changed, 12 insertions, 14 deletions
diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs
index 9503c4c..21fb678 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;
33using OpenSim.Framework.Servers.HttpServer; 34using OpenSim.Framework.Servers.HttpServer;
34using OpenSim.Server.Base; 35using OpenSim.Server.Base;
35using OpenSim.Server.Handlers.Base; 36using OpenSim.Server.Handlers.Base;
@@ -92,27 +93,24 @@ namespace OpenSim.Server
92 if (parts.Length > 1) 93 if (parts.Length > 1)
93 friendlyName = parts[1]; 94 friendlyName = parts[1];
94 95
95 IHttpServer server = m_Server.HttpServer; 96 IHttpServer server;
96 if (port != 0)
97 server = m_Server.GetHttpServer(port);
98 97
99 if (port != m_Server.DefaultPort && port != 0) 98 if (port != 0)
100 m_log.InfoFormat("[SERVER]: Loading {0} on port {1}", friendlyName, port); 99 server = MainServer.GetHttpServer(port);
101 else 100 else
102 m_log.InfoFormat("[SERVER]: Loading {0}", friendlyName); 101 server = MainServer.Instance;
102
103 m_log.InfoFormat("[SERVER]: Loading {0} on port {1}", friendlyName, server.Port);
103 104
104 IServiceConnector connector = null; 105 IServiceConnector connector = null;
105 106
106 Object[] modargs = new Object[] { m_Server.Config, server, 107 Object[] modargs = new Object[] { m_Server.Config, server, configName };
107 configName }; 108 connector = ServerUtils.LoadPlugin<IServiceConnector>(conn, modargs);
108 connector = ServerUtils.LoadPlugin<IServiceConnector>(conn, 109
109 modargs);
110 if (connector == null) 110 if (connector == null)
111 { 111 {
112 modargs = new Object[] { m_Server.Config, server }; 112 modargs = new Object[] { m_Server.Config, server };
113 connector = 113 connector = ServerUtils.LoadPlugin<IServiceConnector>(conn, modargs);
114 ServerUtils.LoadPlugin<IServiceConnector>(conn,
115 modargs);
116 } 114 }
117 115
118 if (connector != null) 116 if (connector != null)
@@ -132,4 +130,4 @@ namespace OpenSim.Server
132 return 0; 130 return 0;
133 } 131 }
134 } 132 }
135} 133} \ No newline at end of file