diff options
author | Teravus Ovares | 2008-06-03 07:12:09 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-03 07:12:09 +0000 |
commit | 61e2254be21b80b5b3934aa5a6e401b858b7fd8e (patch) | |
tree | e459093e30558837cec249349dfdc2e01d2c0972 /OpenSim/Grid | |
parent | * It's probably safe to remove the 'Warning Duplicate packet detected Packet ... (diff) | |
download | opensim-SC_OLD-61e2254be21b80b5b3934aa5a6e401b858b7fd8e.zip opensim-SC_OLD-61e2254be21b80b5b3934aa5a6e401b858b7fd8e.tar.gz opensim-SC_OLD-61e2254be21b80b5b3934aa5a6e401b858b7fd8e.tar.bz2 opensim-SC_OLD-61e2254be21b80b5b3934aa5a6e401b858b7fd8e.tar.xz |
* This should fix presence issues.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/MessagingServer/MessageService.cs | 31 | ||||
-rw-r--r-- | OpenSim/Grid/MessagingServer/PresenceInformer.cs | 4 | ||||
-rw-r--r-- | OpenSim/Grid/MessagingServer/UserPresenceData.cs | 3 |
3 files changed, 24 insertions, 14 deletions
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index 59fef7e..0abb89d 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs | |||
@@ -87,6 +87,8 @@ namespace OpenSim.Grid.MessagingServer | |||
87 | { | 87 | { |
88 | if (!m_presences.Contains(userpresence.agentData.AgentID)) | 88 | if (!m_presences.Contains(userpresence.agentData.AgentID)) |
89 | m_presences.Add(userpresence.agentData.AgentID, userpresence); | 89 | m_presences.Add(userpresence.agentData.AgentID, userpresence); |
90 | else | ||
91 | m_presences[userpresence.agentData.AgentID] = userpresence; | ||
90 | } | 92 | } |
91 | 93 | ||
92 | List<FriendListItem> uFriendList = userpresence.friendData; | 94 | List<FriendListItem> uFriendList = userpresence.friendData; |
@@ -132,18 +134,24 @@ namespace OpenSim.Grid.MessagingServer | |||
132 | UserAgentData p2Handle = m_userManager.GetUserAgentData(userpresence.agentData.AgentID); | 134 | UserAgentData p2Handle = m_userManager.GetUserAgentData(userpresence.agentData.AgentID); |
133 | if (p2Handle != null) | 135 | if (p2Handle != null) |
134 | { | 136 | { |
135 | 137 | if (userpresence.lookupUserRegionYN) | |
138 | { | ||
136 | userpresence.regionData.regionHandle = p2Handle.Handle; | 139 | userpresence.regionData.regionHandle = p2Handle.Handle; |
137 | PresenceInformer friendlistupdater = new PresenceInformer(); | 140 | } |
138 | friendlistupdater.presence1 = friendpresence; | 141 | else |
139 | //friendlistupdater.gridserverurl = m_cfg.GridServerURL; | 142 | { |
140 | //friendlistupdater.gridserversendkey = m_cfg.GridSendKey; | 143 | userpresence.lookupUserRegionYN = true; |
141 | //friendlistupdater.gridserverrecvkey = m_cfg.GridRecvKey; | 144 | } |
142 | friendlistupdater.presence2 = userpresence; | 145 | PresenceInformer friendlistupdater = new PresenceInformer(); |
143 | friendlistupdater.OnGetRegionData += GetRegionInfo; | 146 | friendlistupdater.presence1 = friendpresence; |
144 | friendlistupdater.OnDone += PresenceUpdateDone; | 147 | //friendlistupdater.gridserverurl = m_cfg.GridServerURL; |
145 | WaitCallback cb = new WaitCallback(friendlistupdater.go); | 148 | //friendlistupdater.gridserversendkey = m_cfg.GridSendKey; |
146 | ThreadPool.QueueUserWorkItem(cb); | 149 | //friendlistupdater.gridserverrecvkey = m_cfg.GridRecvKey; |
150 | friendlistupdater.presence2 = userpresence; | ||
151 | friendlistupdater.OnGetRegionData += GetRegionInfo; | ||
152 | friendlistupdater.OnDone += PresenceUpdateDone; | ||
153 | WaitCallback cb = new WaitCallback(friendlistupdater.go); | ||
154 | ThreadPool.QueueUserWorkItem(cb); | ||
147 | 155 | ||
148 | } | 156 | } |
149 | else | 157 | else |
@@ -462,6 +470,7 @@ namespace OpenSim.Grid.MessagingServer | |||
462 | RegionProfileData riData = GetRegionInfo(regionHandle); | 470 | RegionProfileData riData = GetRegionInfo(regionHandle); |
463 | up.regionData = riData; | 471 | up.regionData = riData; |
464 | up.OnlineYN = true; | 472 | up.OnlineYN = true; |
473 | up.lookupUserRegionYN = false; | ||
465 | ProcessFriendListSubscriptions(up); | 474 | ProcessFriendListSubscriptions(up); |
466 | 475 | ||
467 | return new XmlRpcResponse(); | 476 | return new XmlRpcResponse(); |
diff --git a/OpenSim/Grid/MessagingServer/PresenceInformer.cs b/OpenSim/Grid/MessagingServer/PresenceInformer.cs index 050d88a..3e35f20 100644 --- a/OpenSim/Grid/MessagingServer/PresenceInformer.cs +++ b/OpenSim/Grid/MessagingServer/PresenceInformer.cs | |||
@@ -111,8 +111,8 @@ namespace OpenSim.Grid.MessagingServer | |||
111 | ArrayList SendParams = new ArrayList(); | 111 | ArrayList SendParams = new ArrayList(); |
112 | SendParams.Add(PresenceParams); | 112 | SendParams.Add(PresenceParams); |
113 | 113 | ||
114 | 114 | ||
115 | m_log.Info("[PRESENCE]: Informing " + whichRegion.regionName + " at " + whichRegion.httpServerURI); | 115 | 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); |
116 | // Send | 116 | // Send |
117 | XmlRpcRequest RegionReq = new XmlRpcRequest("presence_update", SendParams); | 117 | XmlRpcRequest RegionReq = new XmlRpcRequest("presence_update", SendParams); |
118 | try | 118 | try |
diff --git a/OpenSim/Grid/MessagingServer/UserPresenceData.cs b/OpenSim/Grid/MessagingServer/UserPresenceData.cs index 74a6032..3c5002c 100644 --- a/OpenSim/Grid/MessagingServer/UserPresenceData.cs +++ b/OpenSim/Grid/MessagingServer/UserPresenceData.cs | |||
@@ -40,7 +40,8 @@ namespace OpenSim.Grid.MessagingServer | |||
40 | public string httpURI = String.Empty; | 40 | public string httpURI = String.Empty; |
41 | public List<FriendListItem> friendData = new List<FriendListItem> (); | 41 | public List<FriendListItem> friendData = new List<FriendListItem> (); |
42 | public List<LLUUID> subscriptionData = new List<LLUUID>(); | 42 | public List<LLUUID> subscriptionData = new List<LLUUID>(); |
43 | public bool OnlineYN = false; | 43 | public bool OnlineYN = true; |
44 | public bool lookupUserRegionYN = true; | ||
44 | 45 | ||
45 | public UserPresenceData() | 46 | public UserPresenceData() |
46 | { | 47 | { |