diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index 59fef7edfa..0abb89d67f 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs @@ -87,6 +87,8 @@ namespace OpenSim.Grid.MessagingServer { if (!m_presences.Contains(userpresence.agentData.AgentID)) m_presences.Add(userpresence.agentData.AgentID, userpresence); + else + m_presences[userpresence.agentData.AgentID] = userpresence; } List uFriendList = userpresence.friendData; @@ -132,18 +134,24 @@ namespace OpenSim.Grid.MessagingServer UserAgentData p2Handle = m_userManager.GetUserAgentData(userpresence.agentData.AgentID); if (p2Handle != null) { - + if (userpresence.lookupUserRegionYN) + { userpresence.regionData.regionHandle = p2Handle.Handle; - PresenceInformer friendlistupdater = new PresenceInformer(); - friendlistupdater.presence1 = friendpresence; - //friendlistupdater.gridserverurl = m_cfg.GridServerURL; - //friendlistupdater.gridserversendkey = m_cfg.GridSendKey; - //friendlistupdater.gridserverrecvkey = m_cfg.GridRecvKey; - friendlistupdater.presence2 = userpresence; - friendlistupdater.OnGetRegionData += GetRegionInfo; - friendlistupdater.OnDone += PresenceUpdateDone; - WaitCallback cb = new WaitCallback(friendlistupdater.go); - ThreadPool.QueueUserWorkItem(cb); + } + else + { + userpresence.lookupUserRegionYN = true; + } + PresenceInformer friendlistupdater = new PresenceInformer(); + friendlistupdater.presence1 = friendpresence; + //friendlistupdater.gridserverurl = m_cfg.GridServerURL; + //friendlistupdater.gridserversendkey = m_cfg.GridSendKey; + //friendlistupdater.gridserverrecvkey = m_cfg.GridRecvKey; + friendlistupdater.presence2 = userpresence; + friendlistupdater.OnGetRegionData += GetRegionInfo; + friendlistupdater.OnDone += PresenceUpdateDone; + WaitCallback cb = new WaitCallback(friendlistupdater.go); + ThreadPool.QueueUserWorkItem(cb); } else @@ -462,6 +470,7 @@ namespace OpenSim.Grid.MessagingServer RegionProfileData riData = GetRegionInfo(regionHandle); up.regionData = riData; up.OnlineYN = true; + up.lookupUserRegionYN = false; ProcessFriendListSubscriptions(up); return new XmlRpcResponse(); diff --git a/OpenSim/Grid/MessagingServer/PresenceInformer.cs b/OpenSim/Grid/MessagingServer/PresenceInformer.cs index 050d88a951..3e35f204d5 100644 --- a/OpenSim/Grid/MessagingServer/PresenceInformer.cs +++ b/OpenSim/Grid/MessagingServer/PresenceInformer.cs @@ -111,8 +111,8 @@ namespace OpenSim.Grid.MessagingServer ArrayList SendParams = new ArrayList(); SendParams.Add(PresenceParams); - - m_log.Info("[PRESENCE]: Informing " + whichRegion.regionName + " at " + whichRegion.httpServerURI); + + m_log.InfoFormat("[PRESENCE]: Informing {0}@{1} at {2} about {3}", TalkingAbout.agentData.firstname + " " + TalkingAbout.agentData.lastname, whichRegion.regionName, whichRegion.httpServerURI, UserToUpdate.agentData.firstname + " " + UserToUpdate.agentData.lastname); // Send XmlRpcRequest RegionReq = new XmlRpcRequest("presence_update", SendParams); try diff --git a/OpenSim/Grid/MessagingServer/UserPresenceData.cs b/OpenSim/Grid/MessagingServer/UserPresenceData.cs index 74a6032101..3c5002c850 100644 --- a/OpenSim/Grid/MessagingServer/UserPresenceData.cs +++ b/OpenSim/Grid/MessagingServer/UserPresenceData.cs @@ -40,7 +40,8 @@ namespace OpenSim.Grid.MessagingServer public string httpURI = String.Empty; public List friendData = new List (); public List subscriptionData = new List(); - public bool OnlineYN = false; + public bool OnlineYN = true; + public bool lookupUserRegionYN = true; public UserPresenceData() { diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b7f1d90525..0ef7f266b2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -5981,6 +5981,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP onpb[i] = onpbl; } onp.AgentBlock = onpb; + onp.Header.Reliable = true; OutPacket(onp, ThrottleOutPacketType.Task); } @@ -5995,6 +5996,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP offpb[i] = onpbl; } offp.AgentBlock = offpb; + offp.Header.Reliable = true; OutPacket(offp, ThrottleOutPacketType.Task); } diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 92c808bb18..0762291327 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs @@ -93,8 +93,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends public XmlRpcResponse processPresenceUpdate(XmlRpcRequest req) { - m_log.Info("[FRIENDS]: Got Notification about a user! OMG"); + //m_log.Info("[FRIENDS]: Got Notification about a user! OMG"); Hashtable requestData = (Hashtable)req.Params[0]; + if (requestData.ContainsKey("agent_id") && requestData.ContainsKey("notify_id") && requestData.ContainsKey("status")) { LLUUID notifyAgentId = LLUUID.Zero; @@ -107,7 +108,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends Helpers.TryParse((string)requestData["notify_id"], out notifyAgentId); Helpers.TryParse((string)requestData["agent_id"], out notifyAboutAgentId); - + m_log.InfoFormat("[PRESENCE]: Got presence update for {0}, and we're telling {1}, with a status {2}", notifyAboutAgentId.ToString(), notifyAgentId.ToString(), notifyOnlineStatus.ToString()); ScenePresence avatar = GetPresenceFromAgentID(notifyAgentId); if (avatar != null) { @@ -161,6 +162,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } + else + { + m_log.Warn("[PRESENCE]: Malformed XMLRPC Presence request"); + } return new XmlRpcResponse(); }