mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
* prune and regrade log messages relating to client login and logout
This commit is contained in:
@@ -57,13 +57,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
|
||||
if (appearance != null)
|
||||
{
|
||||
//SetAppearanceAssets(profile, ref appearance);
|
||||
m_log.InfoFormat("[APPEARANCE]: Found : {0}", appearance.ToString());
|
||||
//m_log.DebugFormat("[APPEARANCE]: Found : {0}", appearance.ToString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
appearance = CreateDefault(avatarId);
|
||||
m_log.InfoFormat("[APPEARANCE]: Appearance not found for {0}, creating default", avatarId);
|
||||
m_log.ErrorFormat("[APPEARANCE]: Appearance not found for {0}, creating default", avatarId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -172,11 +172,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
|
||||
AvatarAppearance avatAppearance = null;
|
||||
if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance))
|
||||
{
|
||||
m_log.Info("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence");
|
||||
m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence");
|
||||
avatAppearance = avatar.Appearance;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name);
|
||||
//m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name);
|
||||
|
||||
if (profile != null)
|
||||
{
|
||||
|
||||
@@ -305,7 +305,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||
if (m_rootAgents.ContainsKey(AgentId))
|
||||
{
|
||||
m_rootAgents.Remove(AgentId);
|
||||
m_log.Info("[FRIEND]: Removing " + AgentId + ". Agent was closed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -315,7 +314,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||
lock (m_rootAgents)
|
||||
{
|
||||
m_rootAgents[avatar.UUID] = avatar.RegionHandle;
|
||||
m_log.Info("[FRIEND]: Claiming " + avatar.Firstname + " " + avatar.Lastname + " in region:" + avatar.RegionHandle + ".");
|
||||
// Claim User! my user! Mine mine mine!
|
||||
}
|
||||
}
|
||||
@@ -331,7 +329,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||
if (m_rootAgents[avatar.UUID] == avatar.RegionHandle)
|
||||
{
|
||||
m_rootAgents.Remove(avatar.UUID);
|
||||
m_log.Info("[FRIEND]: Removing " + avatar.Firstname + " " + avatar.Lastname + " as a root agent");
|
||||
m_log.Debug("[FRIEND]: Removing " + avatar.Firstname + " " + avatar.Lastname + " as a root agent");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -799,11 +797,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||
/// <param name="iAmOnline"></param>
|
||||
private void SendPresenceState(IClientAPI client, List<FriendListItem> friendList, bool iAmOnline)
|
||||
{
|
||||
m_log.DebugFormat("[FRIEND]: {0} logged {1}; sending presence updates", client.Name, iAmOnline ? "in" : "out");
|
||||
//m_log.DebugFormat("[FRIEND]: {0} logged {1}; sending presence updates", client.Name, iAmOnline ? "in" : "out");
|
||||
|
||||
if (friendList == null || friendList.Count == 0)
|
||||
{
|
||||
m_log.DebugFormat("[FRIEND]: {0} doesn't have friends.", client.Name);
|
||||
//m_log.DebugFormat("[FRIEND]: {0} doesn't have friends.", client.Name);
|
||||
return; // nothing we can do if she doesn't have friends...
|
||||
}
|
||||
|
||||
@@ -984,8 +982,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||
|
||||
private void OnLogout(IClientAPI remoteClient)
|
||||
{
|
||||
m_log.DebugFormat("[FRIEND]: Client {0} logged out", remoteClient.Name);
|
||||
|
||||
List<FriendListItem> fl;
|
||||
lock (m_friendLists)
|
||||
{
|
||||
|
||||
@@ -64,13 +64,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||
|
||||
if (groupsConfig == null)
|
||||
{
|
||||
m_log.Info("[GROUPS] No configuration found. Using defaults");
|
||||
m_log.Info("[GROUPS]: No configuration found. Using defaults");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!groupsConfig.GetBoolean("Enabled", false))
|
||||
{
|
||||
m_log.Info("[GROUPS] Groups disabled in configuration");
|
||||
m_log.Info("[GROUPS]: Groups disabled in configuration");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -78,8 +78,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.Info("[GROUPS] Activated default groups module");
|
||||
|
||||
lock (m_SceneList)
|
||||
{
|
||||
if (!m_SceneList.Contains(scene))
|
||||
@@ -109,7 +107,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||
|
||||
public void Close()
|
||||
{
|
||||
m_log.Info("[GROUP]: Shutting down group module.");
|
||||
// m_log.Debug("[GROUPS]: Shutting down group module.");
|
||||
|
||||
lock (m_ClientMap)
|
||||
{
|
||||
m_ClientMap.Clear();
|
||||
@@ -135,7 +134,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
|
||||
// Subscribe to instant messages
|
||||
client.OnInstantMessage += OnInstantMessage;
|
||||
client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
|
||||
@@ -148,9 +146,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||
}
|
||||
}
|
||||
|
||||
m_log.Info("[GROUP]: Adding " + client.Name + " to " +
|
||||
osGroup.GroupName + " ");
|
||||
|
||||
GroupMembershipData[] updateGroups = new GroupMembershipData[1];
|
||||
updateGroups[0] = osGroup;
|
||||
|
||||
@@ -211,17 +206,15 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||
{
|
||||
if (m_ClientMap.ContainsKey(agentID))
|
||||
{
|
||||
IClientAPI cli = m_ClientMap[agentID];
|
||||
if (cli != null)
|
||||
{
|
||||
m_log.Info("[GROUP]: Removing all reference to groups "+
|
||||
"for " + cli.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Info("[GROUP]: Removing all reference to groups "+
|
||||
"for " + agentID.ToString());
|
||||
}
|
||||
// IClientAPI cli = m_ClientMap[agentID];
|
||||
// if (cli != null)
|
||||
// {
|
||||
// //m_log.Info("[GROUPS]: Removing all reference to groups for " + cli.Name);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //m_log.Info("[GROUPS]: Removing all reference to groups for " + agentID.ToString());
|
||||
// }
|
||||
m_ClientMap.Remove(agentID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||
// Triggered when the user logs off.
|
||||
public void OnLogout(IClientAPI client)
|
||||
{
|
||||
m_log.DebugFormat("[PRESENCE]: Got OnLogout from {0}", client.Name);
|
||||
if (!(client.Scene is Scene))
|
||||
return;
|
||||
Scene scene = (Scene)client.Scene;
|
||||
@@ -343,12 +342,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||
Hashtable responseData = (Hashtable)resp.Value;
|
||||
if (responseData == null || (!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE")
|
||||
{
|
||||
m_log.ErrorFormat("[PRESENCE] Failed to notify message server of region startup for region {0}", scene.RegionInfo.RegionName);
|
||||
m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of region startup for region {0}", scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
catch (System.Net.WebException)
|
||||
{
|
||||
m_log.ErrorFormat("[PRESENCE] Failed to notify message server of region startup for region {0}", scene.RegionInfo.RegionName);
|
||||
m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of region startup for region {0}", scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,12 +365,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||
Hashtable responseData = (Hashtable)resp.Value;
|
||||
if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE")
|
||||
{
|
||||
m_log.ErrorFormat("[PRESENCE] Failed to notify message server of region shutdown for region {0}", scene.RegionInfo.RegionName);
|
||||
m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of region shutdown for region {0}", scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
catch (System.Net.WebException)
|
||||
{
|
||||
m_log.ErrorFormat("[PRESENCE] Failed to notify message server of region shutdown for region {0}", scene.RegionInfo.RegionName);
|
||||
m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of region shutdown for region {0}", scene.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,12 +390,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||
Hashtable responseData = (Hashtable)resp.Value;
|
||||
if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE")
|
||||
{
|
||||
m_log.ErrorFormat("[PRESENCE] Failed to notify message server of agent location for {0}", agentID.ToString());
|
||||
m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of agent location for {0}", agentID.ToString());
|
||||
}
|
||||
}
|
||||
catch (System.Net.WebException)
|
||||
{
|
||||
m_log.ErrorFormat("[PRESENCE] Failed to notify message server of agent location for {0}", agentID.ToString());
|
||||
m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of agent location for {0}", agentID.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,12 +415,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||
Hashtable responseData = (Hashtable)resp.Value;
|
||||
if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE")
|
||||
{
|
||||
m_log.ErrorFormat("[PRESENCE] Failed to notify message server of agent leaving for {0}", agentID.ToString());
|
||||
m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of agent leaving for {0}", agentID.ToString());
|
||||
}
|
||||
}
|
||||
catch (System.Net.WebException)
|
||||
{
|
||||
m_log.ErrorFormat("[PRESENCE] Failed to notify message server of agent leaving for {0}", agentID.ToString());
|
||||
m_log.ErrorFormat("[PRESENCE]: Failed to notify message server of agent leaving for {0}", agentID.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
private Dictionary<UUID, BlockingLLSDQueue> queues = new Dictionary<UUID, BlockingLLSDQueue>();
|
||||
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
|
||||
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
|
||||
|
||||
|
||||
#region IRegionModule methods
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
@@ -101,11 +100,8 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
// circuit is there.
|
||||
|
||||
scene.EventManager.OnClientClosed += ClientClosed;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
|
||||
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
|
||||
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Enabled EventQueueGetModule for region {0}", scene.RegionInfo.RegionName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -149,10 +145,13 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
{
|
||||
if (!queues.ContainsKey(agentId))
|
||||
{
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId,
|
||||
m_scene.RegionInfo.RegionName);
|
||||
m_log.DebugFormat(
|
||||
"[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
|
||||
agentId, m_scene.RegionInfo.RegionName);
|
||||
|
||||
queues[agentId] = new BlockingLLSDQueue();
|
||||
}
|
||||
|
||||
return queues[agentId];
|
||||
}
|
||||
}
|
||||
@@ -179,17 +178,19 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
|
||||
public bool Enqueue(OSD ev, UUID avatarID)
|
||||
{
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
|
||||
try
|
||||
{
|
||||
BlockingLLSDQueue queue = GetQueue(avatarID);
|
||||
if (queue != null)
|
||||
queue.Enqueue(ev);
|
||||
} catch(NullReferenceException e)
|
||||
}
|
||||
catch(NullReferenceException e)
|
||||
{
|
||||
m_log.Debug("[EVENTQUEUE] Caught exception: " + e);
|
||||
m_log.Error("[EVENTQUEUE] Caught exception: " + e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -234,7 +235,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
{
|
||||
m_AvatarQueueUUIDMapping.Remove(ky);
|
||||
m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
|
||||
m_log.Debug("[EVENTQUEUE]: Removing " + "/CAPS/EQG/" + ky.ToString() + "/");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -258,14 +258,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
m_QueueUUIDAvatarMapping.Remove(ky);
|
||||
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Client {0} deregistered in region {1}.", AgentID, m_scene.RegionInfo.RegionName);
|
||||
}
|
||||
|
||||
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
||||
{
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Avatar {0} entering parcel {1} in region {2}.",
|
||||
avatar.UUID, localLandID, m_scene.RegionInfo.RegionName);
|
||||
}
|
||||
|
||||
private void MakeChildAgent(ScenePresence avatar)
|
||||
@@ -283,7 +275,11 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
|
||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
m_log.DebugFormat("[EVENTQUEUE] OnRegisterCaps: agentID {0} caps {1} region {2}", agentID, caps, m_scene.RegionInfo.RegionName);
|
||||
// Register an event queue for the client
|
||||
|
||||
//m_log.DebugFormat(
|
||||
// "[EVENTQUEUE]: OnRegisterCaps: agentID {0} caps {1} region {2}",
|
||||
// agentID, caps, m_scene.RegionInfo.RegionName);
|
||||
|
||||
// Let's instantiate a Queue for this agent right now
|
||||
TryGetQueue(agentID);
|
||||
@@ -302,7 +298,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
else
|
||||
{
|
||||
EventQueueGetUUID = UUID.Random();
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!");
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: Using random UUID!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,13 +314,12 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
m_AvatarQueueUUIDMapping.Add(agentID, EventQueueGetUUID);
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[EVENTQUEUE]: CAPS URL: {0}", capsBase + EventQueueGetUUID.ToString() + "/");
|
||||
// Register this as a caps handler
|
||||
caps.RegisterHandler("EventQueueGet",
|
||||
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/",
|
||||
delegate(Hashtable m_dhttpMethod)
|
||||
{
|
||||
return ProcessQueue(m_dhttpMethod,agentID, caps);
|
||||
return ProcessQueue(m_dhttpMethod, agentID, caps);
|
||||
}));
|
||||
|
||||
// This will persist this beyond the expiry of the caps handlers
|
||||
@@ -339,7 +334,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
}
|
||||
}
|
||||
|
||||
public Hashtable ProcessQueue(Hashtable request,UUID agentID, Caps caps)
|
||||
public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps)
|
||||
{
|
||||
// TODO: this has to be redone to not busy-wait (and block the thread),
|
||||
// TODO: as soon as we have a non-blocking way to handle HTTP-requests.
|
||||
@@ -382,9 +377,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
responsedata["error_status_text"] = "Upstream error:";
|
||||
responsedata["http_protocol_version"] = "HTTP/1.0";
|
||||
return responsedata;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
OSDArray array = new OSDArray();
|
||||
if (element == null) // didn't have an event in 15s
|
||||
@@ -416,7 +409,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
responsedata["content_type"] = "application/xml";
|
||||
responsedata["keepalive"] = false;
|
||||
responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
|
||||
m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||
//m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||
|
||||
return responsedata;
|
||||
}
|
||||
@@ -561,6 +554,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||
{
|
||||
//return new LLSD();
|
||||
}
|
||||
|
||||
return new OSDString("shutdown404!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,22 +144,20 @@ namespace OpenSim.Region.Environment.Modules
|
||||
//m_log.Debug("[OFFSET]: " + hour + " - " + LindenHour + " - " + offsethours.ToString());
|
||||
|
||||
LindenHourOffset = (long)((float)offsethours * (36000000000/m_day_length));
|
||||
m_log.Info("[SUN]: Directive from the Estate Tools to set the sun phase to LindenHour " + GetLindenEstateHourFromCurrentTime().ToString());
|
||||
m_log.Debug("[SUN]: Directive from the Estate Tools to set the sun phase to LindenHour " + GetLindenEstateHourFromCurrentTime().ToString());
|
||||
}
|
||||
|
||||
// Called immediately after the module is loaded for a given region
|
||||
// i.e. Immediately after instance creation.
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_log.Debug("[SUN] Initializing");
|
||||
|
||||
m_scene = scene;
|
||||
|
||||
m_frame = 0;
|
||||
|
||||
TimeZone local = TimeZone.CurrentTimeZone;
|
||||
TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks;
|
||||
m_log.Debug("[SUN] localtime offset is " + TicksOffset);
|
||||
m_log.Debug("[SUN]: localtime offset is " + TicksOffset);
|
||||
|
||||
// Align ticks with Second Life
|
||||
|
||||
@@ -185,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Debug("[SUN] Configuration access failed, using defaults. Reason: "+e.Message);
|
||||
m_log.Debug("[SUN]: Configuration access failed, using defaults. Reason: "+e.Message);
|
||||
m_mode = d_mode;
|
||||
m_year_length = d_year_length;
|
||||
m_day_length = d_day_length;
|
||||
@@ -231,10 +229,10 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
ready = true;
|
||||
|
||||
m_log.Debug("[SUN] Mode is "+m_mode);
|
||||
m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days");
|
||||
m_log.Debug("[SUN] Axis offset is "+m_day_night);
|
||||
m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames");
|
||||
m_log.Debug("[SUN]: Mode is "+m_mode);
|
||||
m_log.Debug("[SUN]: Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days");
|
||||
m_log.Debug("[SUN]: Axis offset is "+m_day_night);
|
||||
m_log.Debug("[SUN]: Positional data updated every "+m_frame_mod+" frames");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -276,7 +274,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
if (!sunFixed)
|
||||
GenSunPos(); // Generate shared values once
|
||||
client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition);
|
||||
m_log.Debug("[SUN] Initial update for new client");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -383,7 +380,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
if (m_rootAgents.ContainsKey(AgentId))
|
||||
{
|
||||
m_rootAgents.Remove(AgentId);
|
||||
m_log.Info("[SUN]: Removing " + AgentId + ". Agent logged out.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
{
|
||||
public class WindModule : IWindModule
|
||||
{
|
||||
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private int m_frame = 0;
|
||||
@@ -46,40 +45,14 @@ namespace OpenSim.Region.Environment.Modules
|
||||
private Scene m_scene = null;
|
||||
private bool ready = false;
|
||||
private Vector2[] windSpeeds = new Vector2[16 * 16];
|
||||
|
||||
private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
|
||||
|
||||
// Current time in elpased seconds since Jan 1st 1970
|
||||
|
||||
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
m_log.Debug("[WIND] Initializing");
|
||||
|
||||
m_scene = scene;
|
||||
|
||||
m_frame = 0;
|
||||
|
||||
|
||||
|
||||
// Align ticks with Second Life
|
||||
|
||||
|
||||
|
||||
// Just in case they don't have the stanzas
|
||||
try
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Debug("[WIND] Configuration access failed, using defaults. Reason: " + e.Message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
scene.EventManager.OnFrame += WindUpdate;
|
||||
|
||||
scene.EventManager.OnFrame += WindUpdate;
|
||||
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||
scene.EventManager.OnClientClosed += ClientLoggedOut;
|
||||
@@ -88,9 +61,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
GenWindPos();
|
||||
|
||||
ready = true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
@@ -125,13 +95,12 @@ namespace OpenSim.Region.Environment.Modules
|
||||
|
||||
public void WindToClient(IClientAPI client)
|
||||
{
|
||||
if (ready)
|
||||
{
|
||||
//if (!sunFixed)
|
||||
//GenWindPos(); // Generate shared values once
|
||||
client.SendWindData(windSpeeds);
|
||||
m_log.Debug("[WIND] Initial update for new client");
|
||||
}
|
||||
if (ready)
|
||||
{
|
||||
//if (!sunFixed)
|
||||
//GenWindPos(); // Generate shared values once
|
||||
client.SendWindData(windSpeeds);
|
||||
}
|
||||
}
|
||||
|
||||
public void WindUpdate()
|
||||
@@ -199,7 +168,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||
if (m_rootAgents.ContainsKey(AgentId))
|
||||
{
|
||||
m_rootAgents.Remove(AgentId);
|
||||
m_log.Info("[WIND]: Removing " + AgentId + ". Agent logged out.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
|
||||
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
|
||||
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_log.Info("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage);
|
||||
|
||||
m_scene.CommsManager.HttpServer.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
|
||||
m_scene.CommsManager.HttpServer.AddLLSDHandler(
|
||||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
|
||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
//m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
caps.RegisterHandler("MapLayer",
|
||||
new RestStreamHandler("POST", capsBase + m_mapLayerPath,
|
||||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
{
|
||||
if (threadrunning) return;
|
||||
threadrunning = true;
|
||||
m_log.Warn("[WORLD MAP]: Starting remote MapItem request thread");
|
||||
m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread");
|
||||
mapItemReqThread = new Thread(new ThreadStart(process));
|
||||
mapItemReqThread.IsBackground = true;
|
||||
mapItemReqThread.Name = "MapItemRequestThread";
|
||||
@@ -419,7 +419,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
}
|
||||
|
||||
threadrunning = false;
|
||||
m_log.Debug("[WORLD MAP]: Remote request thread exiting");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -557,7 +556,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
||||
m_blacklistedregions.Add(regionhandle, System.Environment.TickCount);
|
||||
}
|
||||
m_log.WarnFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString());
|
||||
m_log.InfoFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,7 +605,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
m_log.InfoFormat("[WORLD MAP]: Bad send on GetMapItems {0}", ex.Message);
|
||||
m_log.WarnFormat("[WORLD MAP]: Bad send on GetMapItems {0}", ex.Message);
|
||||
responseMap["connect"] = OSD.FromBoolean(false);
|
||||
lock (m_blacklistedurls)
|
||||
{
|
||||
@@ -716,7 +715,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
|
||||
public Hashtable OnHTTPGetMapImage(Hashtable keysvals)
|
||||
{
|
||||
m_log.Info("[WORLD MAP]: Sending map image jpeg");
|
||||
m_log.Debug("[WORLD MAP]: Sending map image jpeg");
|
||||
Hashtable reply = new Hashtable();
|
||||
int statuscode = 200;
|
||||
byte[] jpeg = new byte[0];
|
||||
@@ -857,8 +856,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||
// You may ask, why this is in a threadpool to start with..
|
||||
// The reason is so we don't cause the thread to freeze waiting
|
||||
// for the 1 second it costs to start a thread manually.
|
||||
|
||||
m_log.Warn("[WORLD MAP]: MakeRootAgent Works!");
|
||||
if (!threadrunning)
|
||||
ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartThread));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user