diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index 1bb983672f..cdccf0eaef 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs @@ -49,8 +49,7 @@ namespace OpenSim.Framework public void ForEachClient(ForEachClientDelegate whatToDo) { - // Wasteful, I know - IClientAPI[] LocalClients = new IClientAPI[0]; + IClientAPI[] LocalClients; lock (m_clients) { LocalClients = new IClientAPI[m_clients.Count]; diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index c569a71700..b4ee06906b 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -166,7 +166,7 @@ namespace OpenSim.Framework.Communications } else if (requestData.Contains("web_login_key")) { - UUID webloginkey = UUID.Zero; + UUID webloginkey; try { webloginkey = new UUID((string)requestData["web_login_key"]); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b9bc88807e..3265817e34 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -775,7 +775,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Don't let a failure in an individual client thread crash the whole sim. m_log.ErrorFormat( - "[CLIENT]: Client thread for {0} {1} crashed. Logging them out. Exception {2}", Name, AgentId, e); + "[CLIENT]: Client thread for {0} {1} crashed. Logging them out.", Name, AgentId); + m_log.Error(e.ToString()); try { diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index b6aa961205..01f2a09360 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -89,6 +89,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_localScene = value; m_packetServer.LocalScene = m_localScene; + m_location = new Location(m_localScene.RegionInfo.RegionHandle); } } @@ -404,6 +405,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// protected virtual void AddNewClient(UseCircuitCodePacket useCircuit, EndPoint epSender, EndPoint epProxy) { + m_log.Debug("[CONNECTION DEBUGGING] AddNewClient Called"); + //Slave regions don't accept new clients if (m_localScene.Region_Status != RegionStatus.SlaveScene) { diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2287f994ee..e374bbabc2 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -2746,6 +2746,9 @@ namespace OpenSim.Region.Environment.Scenes /// public void NewUserConnection(AgentCircuitData agent) { + m_log.DebugFormat("[CONNECTION DEBUGGING] Adding NewUserConnection for {0} with CC of {1}", agent.AgentID, + agent.circuitcode); + if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) { m_log.WarnFormat( diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 3c51aa65b5..19f0f9cffd 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -510,8 +510,9 @@ namespace OpenSim.Region.Environment.Scenes RegisterToEvents(); SetDirectionVectors(); - CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid); - userInfo.OnItemReceived += ItemReceived; + CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid); + if (userInfo != null) + userInfo.OnItemReceived += ItemReceived; } public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, byte[] visualParams,