diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
3 files changed, 20 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 49b2b5c..dd9b318 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -40,6 +40,7 @@ using OpenSim.Framework.Communications.Cache; | |||
40 | using OpenSim.Region.Framework.Interfaces; | 40 | using OpenSim.Region.Framework.Interfaces; |
41 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
42 | using OpenSim.Services.Interfaces; | 42 | using OpenSim.Services.Interfaces; |
43 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
43 | 44 | ||
44 | namespace OpenSim.Region.CoreModules.Avatar.Friends | 45 | namespace OpenSim.Region.CoreModules.Avatar.Friends |
45 | { | 46 | { |
@@ -108,7 +109,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
108 | private Dictionary<ulong, Scene> m_scenes = new Dictionary<ulong,Scene>(); | 109 | private Dictionary<ulong, Scene> m_scenes = new Dictionary<ulong,Scene>(); |
109 | private IMessageTransferModule m_TransferModule = null; | 110 | private IMessageTransferModule m_TransferModule = null; |
110 | 111 | ||
111 | private IGridServices m_gridServices = null; | 112 | private IGridService m_gridServices = null; |
112 | 113 | ||
113 | #region IRegionModule Members | 114 | #region IRegionModule Members |
114 | 115 | ||
@@ -142,7 +143,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
142 | if (m_scenes.Count > 0) | 143 | if (m_scenes.Count > 0) |
143 | { | 144 | { |
144 | m_TransferModule = m_initialScene.RequestModuleInterface<IMessageTransferModule>(); | 145 | m_TransferModule = m_initialScene.RequestModuleInterface<IMessageTransferModule>(); |
145 | m_gridServices = m_initialScene.CommsManager.GridService; | 146 | m_gridServices = m_initialScene.GridService; |
146 | } | 147 | } |
147 | if (m_TransferModule == null) | 148 | if (m_TransferModule == null) |
148 | m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work"); | 149 | m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work"); |
@@ -171,7 +172,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
171 | List<UUID> tpdAway = new List<UUID>(); | 172 | List<UUID> tpdAway = new List<UUID>(); |
172 | 173 | ||
173 | // destRegionHandle is a region on another server | 174 | // destRegionHandle is a region on another server |
174 | RegionInfo info = m_gridServices.RequestNeighbourInfo(destRegionHandle); | 175 | uint x = 0, y = 0; |
176 | Utils.LongToUInts(destRegionHandle, out x, out y); | ||
177 | GridRegion info = m_gridServices.GetRegionByPosition(m_initialScene.RegionInfo.ScopeID, (int)x, (int)y); | ||
175 | if (info != null) | 178 | if (info != null) |
176 | { | 179 | { |
177 | string httpServer = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/presence_update_bulk"; | 180 | string httpServer = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/presence_update_bulk"; |
@@ -223,7 +226,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
223 | public bool TriggerTerminateFriend(ulong destRegionHandle, UUID agentID, UUID exFriendID) | 226 | public bool TriggerTerminateFriend(ulong destRegionHandle, UUID agentID, UUID exFriendID) |
224 | { | 227 | { |
225 | // destRegionHandle is a region on another server | 228 | // destRegionHandle is a region on another server |
226 | RegionInfo info = m_gridServices.RequestNeighbourInfo(destRegionHandle); | 229 | uint x = 0, y = 0; |
230 | Utils.LongToUInts(destRegionHandle, out x, out y); | ||
231 | GridRegion info = m_gridServices.GetRegionByPosition(m_initialScene.RegionInfo.ScopeID, (int)x, (int)y); | ||
227 | if (info == null) | 232 | if (info == null) |
228 | { | 233 | { |
229 | m_log.WarnFormat("[OGS1 GRID SERVICES]: Couldn't find region {0}", destRegionHandle); | 234 | m_log.WarnFormat("[OGS1 GRID SERVICES]: Couldn't find region {0}", destRegionHandle); |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 4495303..e5159b3 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -36,6 +36,7 @@ using OpenMetaverse; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
39 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
39 | 40 | ||
40 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 41 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage |
41 | { | 42 | { |
@@ -497,7 +498,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
497 | { | 498 | { |
498 | if (upd.AgentOnline) | 499 | if (upd.AgentOnline) |
499 | { | 500 | { |
500 | RegionInfo reginfo = m_Scenes[0].SceneGridService.RequestNeighbouringRegionInfo(upd.Handle); | 501 | uint x = 0, y = 0; |
502 | Utils.LongToUInts(upd.Handle, out x, out y); | ||
503 | GridRegion reginfo = m_Scenes[0].GridService.GetRegionByPosition(m_Scenes[0].RegionInfo.ScopeID, | ||
504 | (int)x, (int)y); | ||
501 | if (reginfo != null) | 505 | if (reginfo != null) |
502 | { | 506 | { |
503 | Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(im); | 507 | Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(im); |
@@ -559,7 +563,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
559 | /// <param name="reginfo">RegionInfo we pull the data out of to send the request to</param> | 563 | /// <param name="reginfo">RegionInfo we pull the data out of to send the request to</param> |
560 | /// <param name="xmlrpcdata">The Instant Message data Hashtable</param> | 564 | /// <param name="xmlrpcdata">The Instant Message data Hashtable</param> |
561 | /// <returns>Bool if the message was successfully delivered at the other side.</returns> | 565 | /// <returns>Bool if the message was successfully delivered at the other side.</returns> |
562 | protected virtual bool doIMSending(RegionInfo reginfo, Hashtable xmlrpcdata) | 566 | protected virtual bool doIMSending(GridRegion reginfo, Hashtable xmlrpcdata) |
563 | { | 567 | { |
564 | 568 | ||
565 | ArrayList SendParams = new ArrayList(); | 569 | ArrayList SendParams = new ArrayList(); |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs index ebd9a72..6daab44 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs | |||
@@ -35,6 +35,7 @@ using OpenMetaverse; | |||
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
38 | 39 | ||
39 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 40 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage |
40 | { | 41 | { |
@@ -171,7 +172,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
171 | { | 172 | { |
172 | // TODO this is the old messaging-server protocol; only the regionHandle is available. | 173 | // TODO this is the old messaging-server protocol; only the regionHandle is available. |
173 | // Fetch region-info to get the id | 174 | // Fetch region-info to get the id |
174 | RegionInfo regionInfo = m_initialScene.RequestNeighbouringRegionInfo(info.regionHandle); | 175 | uint x = 0, y = 0; |
176 | Utils.LongToUInts(info.regionHandle, out x, out y); | ||
177 | GridRegion regionInfo = m_initialScene.GridService.GetRegionByPosition(m_initialScene.RegionInfo.ScopeID, | ||
178 | (int)x, (int)y); | ||
175 | regionID = regionInfo.RegionID; | 179 | regionID = regionInfo.RegionID; |
176 | } | 180 | } |
177 | result[indices[i]] = new PresenceInfo(uuids[i], regionID); | 181 | result[indices[i]] = new PresenceInfo(uuids[i], regionID); |