* refactor: call AddHttpHandler() directly via CommsManager

0.6.2-post-fixes
Justin Clarke Casey 2009-01-06 14:44:45 +00:00
parent b07c188b7e
commit fde6a1665c
5 changed files with 6 additions and 20 deletions

View File

@ -53,7 +53,7 @@ namespace OpenSim.Region.DataSnapshot
m_externalData = externalData;
//Register HTTP handler
if (m_scene.AddHTTPHandler("collector", OnGetSnapshot))
if (m_scene.CommsManager.HttpServer.AddHTTPHandler("collector", OnGetSnapshot))
{
m_log.Info("[DATASNAPSHOT]: Set up snapshot service");
}

View File

@ -121,7 +121,7 @@ namespace OpenSim.Region.Environment.Modules.Communications.REST
protected virtual void AddHTTPHandlers()
{
m_aScene.AddHTTPHandler("/agent/", AgentHandler);
m_aScene.CommsManager.HttpServer.AddHTTPHandler("/agent/", AgentHandler);
}
#endregion /* IRegionModule */

View File

@ -233,7 +233,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
foreach (UUID ky in removeitems)
{
m_AvatarQueueUUIDMapping.Remove(ky);
m_scene.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
m_log.Debug("[EVENTQUEUE]: Removing " + "/CAPS/EQG/" + ky.ToString() + "/");
}
@ -328,7 +328,8 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
}));
// This will persist this beyond the expiry of the caps handlers
m_scene.AddHTTPHandler(capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2);
m_scene.CommsManager.HttpServer.AddHTTPHandler(
capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2);
Random rnd = new Random(System.Environment.TickCount);
lock (m_ids)

View File

@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
regionimage = regionimage.Replace("-", "");
m_log.Warn("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage);
m_scene.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
m_scene.CommsManager.HttpServer.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
m_scene.CommsManager.HttpServer.AddLLSDHandler(
"/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(), HandleRemoteMapItemRequest);

View File

@ -4178,20 +4178,6 @@ namespace OpenSim.Region.Environment.Scenes
#endregion
#region BaseHTTPServer wrapper methods
public bool AddHTTPHandler(string method, GenericHTTPMethod handler)
{
return m_httpListener.AddHTTPHandler(method, handler);
}
public void RemoveHTTPHandler(string httpMethod, string path)
{
m_httpListener.RemoveHTTPHandler(httpMethod, path);
}
#endregion
#region Avatar Appearance Default
public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams)
@ -4480,7 +4466,6 @@ namespace OpenSim.Region.Environment.Scenes
protected internal void jointMoved(PhysicsJoint joint)
{
// m_parentScene.PhysicsScene.DumpJointInfo(); // non-thread-locked version; we should already be in a lock (OdeLock) when this callback is invoked
// FIXME: this causes a sequential lookup of all objects in the scene; use a dictionary
SceneObjectPart jointProxyObject = GetSceneObjectPart(joint.ObjectNameInScene);