Remove all references to HttpServer from CommsManager (all incarnations)

Change all uses of the HttpServer properties to use the new singleton
This commit is contained in:
Melanie Thielker
2009-07-10 02:22:26 +00:00
parent 7b457805a3
commit c310fb11f4
39 changed files with 83 additions and 113 deletions

View File

@@ -90,7 +90,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
{
m_log.InfoFormat("[IRC-Bridge] Connecting region {0}", scene.RegionInfo.RegionName);
if (!String.IsNullOrEmpty(m_password))
scene.CommsManager.HttpServer.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
MainServer.Instance.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
m_region = new RegionState(scene, m_config);
lock (m_regions) m_regions.Add(m_region);
m_region.Open();
@@ -121,7 +121,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
return;
if (!String.IsNullOrEmpty(m_password))
scene.CommsManager.HttpServer.RemoveXmlRPCHandler("irc_admin");
MainServer.Instance.RemoveXmlRPCHandler("irc_admin");
m_region.Close();

View File

@@ -144,7 +144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
{
if (!m_enabled) return;
scene.CommsManager.HttpServer.AddXmlRPCHandler("concierge_update_welcome", XmlRpcUpdateWelcomeMethod, false);
MainServer.Instance.AddXmlRPCHandler("concierge_update_welcome", XmlRpcUpdateWelcomeMethod, false);
lock (m_syncy)
{
@@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
{
if (!m_enabled) return;
scene.CommsManager.HttpServer.RemoveXmlRPCHandler("concierge_update_welcome");
MainServer.Instance.RemoveXmlRPCHandler("concierge_update_welcome");
lock (m_syncy)
{

View File

@@ -170,31 +170,31 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
// - signout: viv_signout.php
if (UseProxy)
{
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/", m_freeSwitchAPIPrefix),
ForwardProxyRequest);
}
else
{
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceGetPreloginHTTPHandler);
// RestStreamHandler h = new
// RestStreamHandler("GET",
// String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler);
// scene.CommsManager.HttpServer.AddStreamHandler(h);
// MainServer.Instance.AddStreamHandler(h);
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceSigninHTTPHandler);
// set up http request handlers to provide
// on-demand FreeSwitch configuration to
// FreeSwitch's mod_curl_xml
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix),
FreeSwitchConfigHTTPHandler);
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceBuddyHTTPHandler);
}