* prune and regrade log messages relating to client login and logout
parent
31b0f07085
commit
a31792ee5c
|
@ -71,12 +71,10 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public void Remove(uint id)
|
public void Remove(uint id)
|
||||||
{
|
{
|
||||||
//m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count);
|
|
||||||
lock (m_clients)
|
lock (m_clients)
|
||||||
{
|
{
|
||||||
m_clients.Remove(id);
|
m_clients.Remove(id);
|
||||||
}
|
}
|
||||||
m_log.InfoFormat("[CLIENT]: Removed client with code {0}, new client count {1}", id, m_clients.Count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Add(uint id, IClientAPI client)
|
public void Add(uint id, IClientAPI client)
|
||||||
|
|
|
@ -80,7 +80,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
if (userID == UUID.Zero)
|
if (userID == UUID.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
|
//m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
|
||||||
GetUserDetails(userID);
|
GetUserDetails(userID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,6 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
{
|
{
|
||||||
if (m_userProfiles.ContainsKey(userId))
|
if (m_userProfiles.ContainsKey(userId))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[USER CACHE]: Removing user {0}", userId);
|
|
||||||
m_userProfiles.Remove(userId);
|
m_userProfiles.Remove(userId);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,7 +157,9 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
// the root of all evil
|
// the root of all evil
|
||||||
m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest);
|
m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest);
|
||||||
m_log.Warn("[SEED]: " + capsBase + m_requestPath);
|
m_log.DebugFormat(
|
||||||
|
"[CAPS]: Registering seed capability {0} for {1}", capsBase + m_requestPath, m_agentID);
|
||||||
|
|
||||||
//m_capsHandlers["MapLayer"] =
|
//m_capsHandlers["MapLayer"] =
|
||||||
// new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST",
|
// new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST",
|
||||||
// capsBase + m_mapLayerPath,
|
// capsBase + m_mapLayerPath,
|
||||||
|
@ -209,7 +211,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
public void RegisterHandler(string capName, IRequestHandler handler)
|
public void RegisterHandler(string capName, IRequestHandler handler)
|
||||||
{
|
{
|
||||||
m_capsHandlers[capName] = handler;
|
m_capsHandlers[capName] = handler;
|
||||||
m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path);
|
//m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -242,10 +244,12 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
public string CapsRequest(string request, string path, string param,
|
public string CapsRequest(string request, string path, string param,
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
|
//m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
|
||||||
//Console.WriteLine("caps request " + request);
|
|
||||||
string result = LLSDHelpers.SerialiseLLSDReply(m_capsHandlers.CapsDetails);
|
string result = LLSDHelpers.SerialiseLLSDReply(m_capsHandlers.CapsDetails);
|
||||||
|
|
||||||
//m_log.DebugFormat("[CAPS] CapsRequest {0}", result);
|
//m_log.DebugFormat("[CAPS] CapsRequest {0}", result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -547,9 +547,6 @@ namespace OpenSim.Framework.Communications
|
||||||
|
|
||||||
if (userProfile != null)
|
if (userProfile != null)
|
||||||
{
|
{
|
||||||
// This line needs to be in side the above if statement or the UserServer will crash on some logouts.
|
|
||||||
m_log.Info("[LOGOUT]: " + userProfile.FirstName + " " + userProfile.SurName + " from " + regionhandle + "(" + position.X + "," + position.Y + "," + position.Z + ")");
|
|
||||||
|
|
||||||
UserAgentData userAgent = userProfile.CurrentAgent;
|
UserAgentData userAgent = userProfile.CurrentAgent;
|
||||||
if (userAgent != null)
|
if (userAgent != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -277,7 +277,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
private void AddActiveGestures(LoginResponse response, UserProfileData theUser)
|
private void AddActiveGestures(LoginResponse response, UserProfileData theUser)
|
||||||
{
|
{
|
||||||
List<InventoryItemBase> gestures = m_inventoryService.GetActiveGestures(theUser.ID);
|
List<InventoryItemBase> gestures = m_inventoryService.GetActiveGestures(theUser.ID);
|
||||||
m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count);
|
//m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count);
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
if (gestures != null)
|
if (gestures != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -534,8 +534,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_clientPingTimer.Enabled = false;
|
m_clientPingTimer.Enabled = false;
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[CLIENT]: Close has been called with shutdownCircuit = {0} on scene {1}",
|
"[CLIENT]: Close has been called with shutdownCircuit = {0} for {1} attached to scene {2}",
|
||||||
shutdownCircuit, m_scene.RegionInfo.RegionName);
|
shutdownCircuit, Name, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
m_PacketHandler.Flush();
|
m_PacketHandler.Flush();
|
||||||
|
|
||||||
|
@ -724,7 +724,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
protected virtual void ClientLoop()
|
protected virtual void ClientLoop()
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[CLIENT]: Entered main packet processing loop for {0} {1}", FirstName, LastName);
|
"[CLIENT]: Entered main packet processing loop for {0} in {1}", Name, Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
while (IsActive)
|
while (IsActive)
|
||||||
{
|
{
|
||||||
|
@ -3807,7 +3807,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected virtual bool Logout(IClientAPI client)
|
protected virtual bool Logout(IClientAPI client)
|
||||||
{
|
{
|
||||||
m_log.Info("[CLIENT]: Got a logout request");
|
m_log.InfoFormat("[CLIENT]: Got a logout request for {0} in {1}", Name, Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
handlerLogout = OnLogout;
|
handlerLogout = OnLogout;
|
||||||
|
|
||||||
|
@ -4419,8 +4419,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (handlerRequestWearables != null)
|
if (handlerRequestWearables != null)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[APPEARANCE]: Wearables requested by {0}", Name);
|
|
||||||
|
|
||||||
handlerRequestWearables();
|
handlerRequestWearables();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void WipeClean()
|
public void WipeClean()
|
||||||
{
|
{
|
||||||
m_log.Info("[PACKETQUEUE] Wiping Packet Queues Clean");
|
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
ResendOutgoingPacketQueue.Clear();
|
ResendOutgoingPacketQueue.Clear();
|
||||||
|
@ -275,7 +274,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
m_log.Info("[PACKETQUEUE] Close called");
|
|
||||||
Flush();
|
Flush();
|
||||||
WipeClean(); // I'm sure there's a dirty joke in here somewhere. -AFrisby
|
WipeClean(); // I'm sure there's a dirty joke in here somewhere. -AFrisby
|
||||||
|
|
||||||
|
|
|
@ -408,8 +408,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <param name="epProxy"></param>
|
/// <param name="epProxy"></param>
|
||||||
protected virtual void AddNewClient(UseCircuitCodePacket useCircuit, EndPoint epSender, EndPoint epProxy)
|
protected virtual void AddNewClient(UseCircuitCodePacket useCircuit, EndPoint epSender, EndPoint epProxy)
|
||||||
{
|
{
|
||||||
m_log.Debug("[CONNECTION DEBUGGING] AddNewClient Called");
|
|
||||||
|
|
||||||
//Slave regions don't accept new clients
|
//Slave regions don't accept new clients
|
||||||
if (m_localScene.Region_Status != RegionStatus.SlaveScene)
|
if (m_localScene.Region_Status != RegionStatus.SlaveScene)
|
||||||
{
|
{
|
||||||
|
@ -426,7 +424,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Info("[CLIENT]: Got authenticated connection from " + epSender);
|
m_log.Debug("[CLIENT]: Got authenticated connection from " + epSender);
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (clientCircuits)
|
lock (clientCircuits)
|
||||||
|
|
|
@ -266,7 +266,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
private void AddActiveGestures(LoginResponse response, UserProfileData theUser)
|
private void AddActiveGestures(LoginResponse response, UserProfileData theUser)
|
||||||
{
|
{
|
||||||
List<InventoryItemBase> gestures = m_interServiceInventoryService.GetActiveGestures(theUser.ID);
|
List<InventoryItemBase> gestures = m_interServiceInventoryService.GetActiveGestures(theUser.ID);
|
||||||
m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count);
|
//m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count);
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
if (gestures != null)
|
if (gestures != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -622,12 +622,12 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
|
|
||||||
if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
|
if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
|
||||||
{
|
{
|
||||||
m_log.Debug("[CLIENT]: Child agent detected");
|
//m_log.Debug("[CLIENT]: Child agent detected");
|
||||||
agentData.child = true;
|
agentData.child = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Debug("[CLIENT]: Main agent detected");
|
//m_log.Debug("[CLIENT]: Main agent detected");
|
||||||
agentData.startpos =
|
agentData.startpos =
|
||||||
new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]),
|
new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]),
|
||||||
(float)Convert.ToDecimal((string)requestData["startpos_y"]),
|
(float)Convert.ToDecimal((string)requestData["startpos_y"]),
|
||||||
|
|
|
@ -57,13 +57,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
|
||||||
if (appearance != null)
|
if (appearance != null)
|
||||||
{
|
{
|
||||||
//SetAppearanceAssets(profile, ref appearance);
|
//SetAppearanceAssets(profile, ref appearance);
|
||||||
m_log.InfoFormat("[APPEARANCE]: Found : {0}", appearance.ToString());
|
//m_log.DebugFormat("[APPEARANCE]: Found : {0}", appearance.ToString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
appearance = CreateDefault(avatarId);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,11 +172,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
|
||||||
AvatarAppearance avatAppearance = null;
|
AvatarAppearance avatAppearance = null;
|
||||||
if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance))
|
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;
|
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)
|
if (profile != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -305,7 +305,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||||
if (m_rootAgents.ContainsKey(AgentId))
|
if (m_rootAgents.ContainsKey(AgentId))
|
||||||
{
|
{
|
||||||
m_rootAgents.Remove(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)
|
lock (m_rootAgents)
|
||||||
{
|
{
|
||||||
m_rootAgents[avatar.UUID] = avatar.RegionHandle;
|
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!
|
// 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)
|
if (m_rootAgents[avatar.UUID] == avatar.RegionHandle)
|
||||||
{
|
{
|
||||||
m_rootAgents.Remove(avatar.UUID);
|
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>
|
/// <param name="iAmOnline"></param>
|
||||||
private void SendPresenceState(IClientAPI client, List<FriendListItem> friendList, bool iAmOnline)
|
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)
|
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...
|
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)
|
private void OnLogout(IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[FRIEND]: Client {0} logged out", remoteClient.Name);
|
|
||||||
|
|
||||||
List<FriendListItem> fl;
|
List<FriendListItem> fl;
|
||||||
lock (m_friendLists)
|
lock (m_friendLists)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,13 +64,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||||
|
|
||||||
if (groupsConfig == null)
|
if (groupsConfig == null)
|
||||||
{
|
{
|
||||||
m_log.Info("[GROUPS] No configuration found. Using defaults");
|
m_log.Info("[GROUPS]: No configuration found. Using defaults");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!groupsConfig.GetBoolean("Enabled", false))
|
if (!groupsConfig.GetBoolean("Enabled", false))
|
||||||
{
|
{
|
||||||
m_log.Info("[GROUPS] Groups disabled in configuration");
|
m_log.Info("[GROUPS]: Groups disabled in configuration");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,8 +78,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Info("[GROUPS] Activated default groups module");
|
|
||||||
|
|
||||||
lock (m_SceneList)
|
lock (m_SceneList)
|
||||||
{
|
{
|
||||||
if (!m_SceneList.Contains(scene))
|
if (!m_SceneList.Contains(scene))
|
||||||
|
@ -109,7 +107,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
m_log.Info("[GROUP]: Shutting down group module.");
|
// m_log.Debug("[GROUPS]: Shutting down group module.");
|
||||||
|
|
||||||
lock (m_ClientMap)
|
lock (m_ClientMap)
|
||||||
{
|
{
|
||||||
m_ClientMap.Clear();
|
m_ClientMap.Clear();
|
||||||
|
@ -135,7 +134,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||||
|
|
||||||
private void OnNewClient(IClientAPI client)
|
private void OnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Subscribe to instant messages
|
// Subscribe to instant messages
|
||||||
client.OnInstantMessage += OnInstantMessage;
|
client.OnInstantMessage += OnInstantMessage;
|
||||||
client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
|
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];
|
GroupMembershipData[] updateGroups = new GroupMembershipData[1];
|
||||||
updateGroups[0] = osGroup;
|
updateGroups[0] = osGroup;
|
||||||
|
|
||||||
|
@ -211,17 +206,15 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
|
||||||
{
|
{
|
||||||
if (m_ClientMap.ContainsKey(agentID))
|
if (m_ClientMap.ContainsKey(agentID))
|
||||||
{
|
{
|
||||||
IClientAPI cli = m_ClientMap[agentID];
|
// IClientAPI cli = m_ClientMap[agentID];
|
||||||
if (cli != null)
|
// if (cli != null)
|
||||||
{
|
// {
|
||||||
m_log.Info("[GROUP]: Removing all reference to groups "+
|
// //m_log.Info("[GROUPS]: Removing all reference to groups for " + cli.Name);
|
||||||
"for " + cli.Name);
|
// }
|
||||||
}
|
// else
|
||||||
else
|
// {
|
||||||
{
|
// //m_log.Info("[GROUPS]: Removing all reference to groups for " + agentID.ToString());
|
||||||
m_log.Info("[GROUP]: Removing all reference to groups "+
|
// }
|
||||||
"for " + agentID.ToString());
|
|
||||||
}
|
|
||||||
m_ClientMap.Remove(agentID);
|
m_ClientMap.Remove(agentID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||||
// Triggered when the user logs off.
|
// Triggered when the user logs off.
|
||||||
public void OnLogout(IClientAPI client)
|
public void OnLogout(IClientAPI client)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[PRESENCE]: Got OnLogout from {0}", client.Name);
|
|
||||||
if (!(client.Scene is Scene))
|
if (!(client.Scene is Scene))
|
||||||
return;
|
return;
|
||||||
Scene scene = (Scene)client.Scene;
|
Scene scene = (Scene)client.Scene;
|
||||||
|
@ -343,12 +342,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||||
Hashtable responseData = (Hashtable)resp.Value;
|
Hashtable responseData = (Hashtable)resp.Value;
|
||||||
if (responseData == null || (!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE")
|
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)
|
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;
|
Hashtable responseData = (Hashtable)resp.Value;
|
||||||
if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE")
|
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)
|
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;
|
Hashtable responseData = (Hashtable)resp.Value;
|
||||||
if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE")
|
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)
|
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;
|
Hashtable responseData = (Hashtable)resp.Value;
|
||||||
if ((!responseData.ContainsKey("success")) || (string)responseData["success"] != "TRUE")
|
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)
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
|
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
|
||||||
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
|
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
|
||||||
|
|
||||||
|
|
||||||
#region IRegionModule methods
|
#region IRegionModule methods
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
|
@ -101,11 +100,8 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
// circuit is there.
|
// circuit is there.
|
||||||
|
|
||||||
scene.EventManager.OnClientClosed += ClientClosed;
|
scene.EventManager.OnClientClosed += ClientClosed;
|
||||||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
|
||||||
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
|
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
|
||||||
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
|
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
|
||||||
|
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Enabled EventQueueGetModule for region {0}", scene.RegionInfo.RegionName);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -149,10 +145,13 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
{
|
{
|
||||||
if (!queues.ContainsKey(agentId))
|
if (!queues.ContainsKey(agentId))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId,
|
m_log.DebugFormat(
|
||||||
m_scene.RegionInfo.RegionName);
|
"[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
|
||||||
|
agentId, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
queues[agentId] = new BlockingLLSDQueue();
|
queues[agentId] = new BlockingLLSDQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
return queues[agentId];
|
return queues[agentId];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,17 +178,19 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
|
|
||||||
public bool Enqueue(OSD ev, UUID avatarID)
|
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
|
try
|
||||||
{
|
{
|
||||||
BlockingLLSDQueue queue = GetQueue(avatarID);
|
BlockingLLSDQueue queue = GetQueue(avatarID);
|
||||||
if (queue != null)
|
if (queue != null)
|
||||||
queue.Enqueue(ev);
|
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 false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +235,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
{
|
{
|
||||||
m_AvatarQueueUUIDMapping.Remove(ky);
|
m_AvatarQueueUUIDMapping.Remove(ky);
|
||||||
m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
|
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_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)
|
private void MakeChildAgent(ScenePresence avatar)
|
||||||
|
@ -283,7 +275,11 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
|
|
||||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
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
|
// Let's instantiate a Queue for this agent right now
|
||||||
TryGetQueue(agentID);
|
TryGetQueue(agentID);
|
||||||
|
@ -302,7 +298,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EventQueueGetUUID = UUID.Random();
|
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_AvatarQueueUUIDMapping.Add(agentID, EventQueueGetUUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: CAPS URL: {0}", capsBase + EventQueueGetUUID.ToString() + "/");
|
|
||||||
// Register this as a caps handler
|
// Register this as a caps handler
|
||||||
caps.RegisterHandler("EventQueueGet",
|
caps.RegisterHandler("EventQueueGet",
|
||||||
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/",
|
new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/",
|
||||||
delegate(Hashtable m_dhttpMethod)
|
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
|
// 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: 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.
|
// TODO: as soon as we have a non-blocking way to handle HTTP-requests.
|
||||||
|
@ -384,8 +379,6 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
return responsedata;
|
return responsedata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OSDArray array = new OSDArray();
|
OSDArray array = new OSDArray();
|
||||||
if (element == null) // didn't have an event in 15s
|
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["content_type"] = "application/xml";
|
||||||
responsedata["keepalive"] = false;
|
responsedata["keepalive"] = false;
|
||||||
responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
|
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;
|
return responsedata;
|
||||||
}
|
}
|
||||||
|
@ -561,6 +554,7 @@ namespace OpenSim.Region.Environment.Modules.Framework.EventQueue
|
||||||
{
|
{
|
||||||
//return new LLSD();
|
//return new LLSD();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new OSDString("shutdown404!");
|
return new OSDString("shutdown404!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,22 +144,20 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
//m_log.Debug("[OFFSET]: " + hour + " - " + LindenHour + " - " + offsethours.ToString());
|
//m_log.Debug("[OFFSET]: " + hour + " - " + LindenHour + " - " + offsethours.ToString());
|
||||||
|
|
||||||
LindenHourOffset = (long)((float)offsethours * (36000000000/m_day_length));
|
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
|
// Called immediately after the module is loaded for a given region
|
||||||
// i.e. Immediately after instance creation.
|
// i.e. Immediately after instance creation.
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_log.Debug("[SUN] Initializing");
|
|
||||||
|
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
|
|
||||||
TimeZone local = TimeZone.CurrentTimeZone;
|
TimeZone local = TimeZone.CurrentTimeZone;
|
||||||
TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks;
|
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
|
// Align ticks with Second Life
|
||||||
|
|
||||||
|
@ -185,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
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_mode = d_mode;
|
||||||
m_year_length = d_year_length;
|
m_year_length = d_year_length;
|
||||||
m_day_length = d_day_length;
|
m_day_length = d_day_length;
|
||||||
|
@ -231,10 +229,10 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
ready = true;
|
ready = true;
|
||||||
|
|
||||||
m_log.Debug("[SUN] Mode is "+m_mode);
|
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]: 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]: Axis offset is "+m_day_night);
|
||||||
m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames");
|
m_log.Debug("[SUN]: Positional data updated every "+m_frame_mod+" frames");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -276,7 +274,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
if (!sunFixed)
|
if (!sunFixed)
|
||||||
GenSunPos(); // Generate shared values once
|
GenSunPos(); // Generate shared values once
|
||||||
client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition);
|
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))
|
if (m_rootAgents.ContainsKey(AgentId))
|
||||||
{
|
{
|
||||||
m_rootAgents.Remove(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
|
public class WindModule : IWindModule
|
||||||
{
|
{
|
||||||
|
|
||||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private int m_frame = 0;
|
private int m_frame = 0;
|
||||||
|
@ -46,40 +45,14 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
private Scene m_scene = null;
|
private Scene m_scene = null;
|
||||||
private bool ready = false;
|
private bool ready = false;
|
||||||
private Vector2[] windSpeeds = new Vector2[16 * 16];
|
private Vector2[] windSpeeds = new Vector2[16 * 16];
|
||||||
|
|
||||||
private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
|
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)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
m_log.Debug("[WIND] Initializing");
|
|
||||||
|
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
m_frame = 0;
|
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.OnMakeChildAgent += MakeChildAgent;
|
||||||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||||
scene.EventManager.OnClientClosed += ClientLoggedOut;
|
scene.EventManager.OnClientClosed += ClientLoggedOut;
|
||||||
|
@ -88,9 +61,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
GenWindPos();
|
GenWindPos();
|
||||||
|
|
||||||
ready = true;
|
ready = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
@ -130,7 +100,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
//if (!sunFixed)
|
//if (!sunFixed)
|
||||||
//GenWindPos(); // Generate shared values once
|
//GenWindPos(); // Generate shared values once
|
||||||
client.SendWindData(windSpeeds);
|
client.SendWindData(windSpeeds);
|
||||||
m_log.Debug("[WIND] Initial update for new client");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +168,6 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
if (m_rootAgents.ContainsKey(AgentId))
|
if (m_rootAgents.ContainsKey(AgentId))
|
||||||
{
|
{
|
||||||
m_rootAgents.Remove(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();
|
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
|
||||||
regionimage = regionimage.Replace("-", "");
|
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.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
|
||||||
m_scene.CommsManager.HttpServer.AddLLSDHandler(
|
m_scene.CommsManager.HttpServer.AddLLSDHandler(
|
||||||
|
@ -137,7 +137,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
|
|
||||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
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;
|
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||||
caps.RegisterHandler("MapLayer",
|
caps.RegisterHandler("MapLayer",
|
||||||
new RestStreamHandler("POST", capsBase + m_mapLayerPath,
|
new RestStreamHandler("POST", capsBase + m_mapLayerPath,
|
||||||
|
@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
{
|
{
|
||||||
if (threadrunning) return;
|
if (threadrunning) return;
|
||||||
threadrunning = true;
|
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 = new Thread(new ThreadStart(process));
|
||||||
mapItemReqThread.IsBackground = true;
|
mapItemReqThread.IsBackground = true;
|
||||||
mapItemReqThread.Name = "MapItemRequestThread";
|
mapItemReqThread.Name = "MapItemRequestThread";
|
||||||
|
@ -419,7 +419,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
}
|
}
|
||||||
|
|
||||||
threadrunning = false;
|
threadrunning = false;
|
||||||
m_log.Debug("[WORLD MAP]: Remote request thread exiting");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -557,7 +556,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
if (!m_blacklistedregions.ContainsKey(regionhandle))
|
||||||
m_blacklistedregions.Add(regionhandle, System.Environment.TickCount);
|
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)
|
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);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
lock (m_blacklistedurls)
|
lock (m_blacklistedurls)
|
||||||
{
|
{
|
||||||
|
@ -716,7 +715,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
|
|
||||||
public Hashtable OnHTTPGetMapImage(Hashtable keysvals)
|
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();
|
Hashtable reply = new Hashtable();
|
||||||
int statuscode = 200;
|
int statuscode = 200;
|
||||||
byte[] jpeg = new byte[0];
|
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..
|
// 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
|
// The reason is so we don't cause the thread to freeze waiting
|
||||||
// for the 1 second it costs to start a thread manually.
|
// for the 1 second it costs to start a thread manually.
|
||||||
|
|
||||||
m_log.Warn("[WORLD MAP]: MakeRootAgent Works!");
|
|
||||||
if (!threadrunning)
|
if (!threadrunning)
|
||||||
ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartThread));
|
ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartThread));
|
||||||
|
|
||||||
|
|
|
@ -2576,7 +2576,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
if (avatar.Scene.NeedSceneCacheClear(avatar.UUID))
|
if (avatar.Scene.NeedSceneCacheClear(avatar.UUID))
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[SCENE]: User {0} is going to another region, profile cache removed in {1}", avatar.UUID, RegionInfo.RegionName);
|
|
||||||
CommsManager.UserProfileCacheService.RemoveUser(agentID);
|
CommsManager.UserProfileCacheService.RemoveUser(agentID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2860,10 +2859,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
String capsObjectPath = GetCapsPath(agentId);
|
String capsObjectPath = GetCapsPath(agentId);
|
||||||
|
|
||||||
m_log.DebugFormat(
|
|
||||||
"[CAPS]: Setting up CAPS handler for agent {0} in {1}",
|
|
||||||
agentId, RegionInfo.RegionName);
|
|
||||||
|
|
||||||
Caps cap = null;
|
Caps cap = null;
|
||||||
if (m_capsHandlers.TryGetValue(agentId, out cap))
|
if (m_capsHandlers.TryGetValue(agentId, out cap))
|
||||||
{
|
{
|
||||||
|
@ -2908,7 +2903,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (childrenSeeds.ContainsKey(agentId))
|
if (childrenSeeds.ContainsKey(agentId))
|
||||||
{
|
{
|
||||||
//Console.WriteLine(" !!! Removing seeds for {0} in {1}", agentId, RegionInfo.RegionName);
|
|
||||||
childrenSeeds.Remove(agentId);
|
childrenSeeds.Remove(agentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2916,10 +2910,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (m_capsHandlers.ContainsKey(agentId))
|
if (m_capsHandlers.ContainsKey(agentId))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
|
||||||
"[CAPS]: Removing CAPS handler for root agent {0} in {1}",
|
|
||||||
agentId, RegionInfo.RegionName);
|
|
||||||
|
|
||||||
m_capsHandlers[agentId].DeregisterHandlers();
|
m_capsHandlers[agentId].DeregisterHandlers();
|
||||||
EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]);
|
EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]);
|
||||||
|
|
||||||
|
|
|
@ -355,8 +355,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
neighbours =
|
neighbours =
|
||||||
m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
|
m_commsProvider.GridService.RequestNeighbours(m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
|
||||||
|
|
||||||
m_log.Debug("[SCM]: EnableChildAgents from " + avatar.Scene.RegionInfo.RegionName);
|
|
||||||
|
|
||||||
/// We need to find the difference between the new regions where there are no child agents
|
/// We need to find the difference between the new regions where there are no child agents
|
||||||
/// and the regions where there are already child agents. We only send notification to the former.
|
/// and the regions where there are already child agents. We only send notification to the former.
|
||||||
List<ulong> neighbourHandles = NeighbourHandles(neighbours); // on this region
|
List<ulong> neighbourHandles = NeighbourHandles(neighbours); // on this region
|
||||||
|
|
|
@ -505,7 +505,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
get { return m_knownChildRegions; }
|
get { return m_knownChildRegions; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
//Console.WriteLine(" !! Setting known regions in {0} to {1}", Scene.RegionInfo.RegionName, value.Count);
|
|
||||||
m_knownChildRegions = value;
|
m_knownChildRegions = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -587,8 +586,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid);
|
CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid);
|
||||||
if (userInfo != null)
|
if (userInfo != null)
|
||||||
userInfo.OnItemReceived += ItemReceived;
|
userInfo.OnItemReceived += ItemReceived;
|
||||||
|
|
||||||
m_log.Info("[AVATAR]: New ScenePresence in " + Scene.RegionInfo.RegionName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams,
|
public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams,
|
||||||
|
@ -803,7 +800,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
"[SCENE]: Upgrading child to root agent for {0} in {1}",
|
"[SCENE]: Upgrading child to root agent for {0} in {1}",
|
||||||
Name, m_scene.RegionInfo.RegionName);
|
Name, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count);
|
//m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count);
|
||||||
|
|
||||||
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
||||||
if (gm != null)
|
if (gm != null)
|
||||||
|
@ -2173,8 +2170,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="client"></param>
|
/// <param name="client"></param>
|
||||||
public void SendWearables()
|
public void SendWearables()
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[APPEARANCE]: Sending wearables to {0}", Name);
|
|
||||||
|
|
||||||
ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
|
ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2183,8 +2178,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendAppearanceToAllOtherAgents()
|
public void SendAppearanceToAllOtherAgents()
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[APPEARANCE]: Sending appearance to all other agents for {0}", Name);
|
|
||||||
|
|
||||||
m_perfMonMS = System.Environment.TickCount;
|
m_perfMonMS = System.Environment.TickCount;
|
||||||
|
|
||||||
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
||||||
|
@ -2215,8 +2208,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="visualParam"></param>
|
/// <param name="visualParam"></param>
|
||||||
public void SetAppearance(byte[] texture, List<byte> visualParam)
|
public void SetAppearance(byte[] texture, List<byte> visualParam)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[APPEARANCE]: Receiving appearance for {0}", Name);
|
|
||||||
|
|
||||||
m_appearance.SetAppearance(texture, visualParam);
|
m_appearance.SetAppearance(texture, visualParam);
|
||||||
SetHeight(m_appearance.AvatarHeight);
|
SetHeight(m_appearance.AvatarHeight);
|
||||||
m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance);
|
m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance);
|
||||||
|
@ -2232,8 +2223,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public void SetWearable(int wearableId, AvatarWearable wearable)
|
public void SetWearable(int wearableId, AvatarWearable wearable)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[APPEARANCE]: Setting wearable for {0}", Name);
|
|
||||||
|
|
||||||
m_appearance.SetWearable(wearableId, wearable);
|
m_appearance.SetWearable(wearableId, wearable);
|
||||||
m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance);
|
m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance);
|
||||||
m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
|
m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
|
||||||
|
@ -2467,7 +2456,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
IEventQueue eq = m_scene.RequestModuleInterface<IEventQueue>();
|
IEventQueue eq = m_scene.RequestModuleInterface<IEventQueue>();
|
||||||
if (eq != null)
|
if (eq != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
OSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
|
OSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
|
||||||
capsPath, UUID, ControllingClient.SessionId);
|
capsPath, UUID, ControllingClient.SessionId);
|
||||||
eq.Enqueue(Item, UUID);
|
eq.Enqueue(Item, UUID);
|
||||||
|
|
Loading…
Reference in New Issue