diff options
author | Diva Canto | 2009-09-26 07:48:21 -0700 |
---|---|---|
committer | Diva Canto | 2009-09-26 07:48:21 -0700 |
commit | 5757afe7665543e8b3ed4a322a7d6e095dafcdb3 (patch) | |
tree | bed3c7ab11459e84baa5a0fbd98dde4a81fd5e16 /OpenSim/Region/CoreModules/Avatar/Friends | |
parent | More small changes to FlotsamAssetCache as per mcortez' request. (diff) | |
download | opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.zip opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.gz opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.bz2 opensim-SC_OLD-5757afe7665543e8b3ed4a322a7d6e095dafcdb3.tar.xz |
First pass at the heart surgery for grid services. Compiles and runs minimally. A few bugs to catch now.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Friends')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 13 |
1 files changed, 9 insertions, 4 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); |