From 5757afe7665543e8b3ed4a322a7d6e095dafcdb3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 26 Sep 2009 07:48:21 -0700
Subject: First pass at the heart surgery for grid services. Compiles and runs
minimally. A few bugs to catch now.
---
.../CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 8 ++++++--
.../Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs | 6 +++++-
2 files changed, 11 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
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;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
+using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{
@@ -497,7 +498,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{
if (upd.AgentOnline)
{
- RegionInfo reginfo = m_Scenes[0].SceneGridService.RequestNeighbouringRegionInfo(upd.Handle);
+ uint x = 0, y = 0;
+ Utils.LongToUInts(upd.Handle, out x, out y);
+ GridRegion reginfo = m_Scenes[0].GridService.GetRegionByPosition(m_Scenes[0].RegionInfo.ScopeID,
+ (int)x, (int)y);
if (reginfo != null)
{
Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(im);
@@ -559,7 +563,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
/// RegionInfo we pull the data out of to send the request to
/// The Instant Message data Hashtable
/// Bool if the message was successfully delivered at the other side.
- protected virtual bool doIMSending(RegionInfo reginfo, Hashtable xmlrpcdata)
+ protected virtual bool doIMSending(GridRegion reginfo, Hashtable xmlrpcdata)
{
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;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
+using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{
@@ -171,7 +172,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{
// TODO this is the old messaging-server protocol; only the regionHandle is available.
// Fetch region-info to get the id
- RegionInfo regionInfo = m_initialScene.RequestNeighbouringRegionInfo(info.regionHandle);
+ uint x = 0, y = 0;
+ Utils.LongToUInts(info.regionHandle, out x, out y);
+ GridRegion regionInfo = m_initialScene.GridService.GetRegionByPosition(m_initialScene.RegionInfo.ScopeID,
+ (int)x, (int)y);
regionID = regionInfo.RegionID;
}
result[indices[i]] = new PresenceInfo(uuids[i], regionID);
--
cgit v1.1
From 632bb7126277b6e8b524b76fb181a079b51adcf4 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 26 Sep 2009 08:49:48 -0700
Subject: Fixed MapBlocks bug, wrong order of arguments. First version that
seems completely functional. Also fixed the notification of the message
server in standalone -- that server doesn't usually exist.
---
.../CoreModules/Avatar/InstantMessage/PresenceModule.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
(limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
index 6daab44..5a9b452 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
@@ -330,6 +330,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void NotifyMessageServerOfStartup(Scene scene)
{
+ if (m_Scenes[0].CommsManager.NetworkServersInfo.MessagingURL == string.Empty)
+ return;
+
Hashtable xmlrpcdata = new Hashtable();
xmlrpcdata["RegionUUID"] = scene.RegionInfo.RegionID.ToString();
ArrayList SendParams = new ArrayList();
@@ -353,6 +356,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void NotifyMessageServerOfShutdown(Scene scene)
{
+ if (m_Scenes[0].CommsManager.NetworkServersInfo.MessagingURL == string.Empty)
+ return;
+
Hashtable xmlrpcdata = new Hashtable();
xmlrpcdata["RegionUUID"] = scene.RegionInfo.RegionID.ToString();
ArrayList SendParams = new ArrayList();
@@ -376,6 +382,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void NotifyMessageServerOfAgentLocation(UUID agentID, UUID region, ulong regionHandle)
{
+ if (m_Scenes[0].CommsManager.NetworkServersInfo.MessagingURL == string.Empty)
+ return;
+
Hashtable xmlrpcdata = new Hashtable();
xmlrpcdata["AgentID"] = agentID.ToString();
xmlrpcdata["RegionUUID"] = region.ToString();
@@ -401,6 +410,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void NotifyMessageServerOfAgentLeaving(UUID agentID, UUID region, ulong regionHandle)
{
+ if (m_Scenes[0].CommsManager.NetworkServersInfo.MessagingURL == string.Empty)
+ return;
+
Hashtable xmlrpcdata = new Hashtable();
xmlrpcdata["AgentID"] = agentID.ToString();
xmlrpcdata["RegionUUID"] = region.ToString();
--
cgit v1.1
From e15a9b848413115644d3a6dd920e146b9589b639 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 27 Sep 2009 17:01:30 -0700
Subject: Fixed an issue with the PresenceModule in "gridmode", introduced by
my fixing the notifications of the messaging service in standalone.
---
OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs | 3 ---
1 file changed, 3 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
index 5a9b452..ad05bab 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
@@ -330,9 +330,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void NotifyMessageServerOfStartup(Scene scene)
{
- if (m_Scenes[0].CommsManager.NetworkServersInfo.MessagingURL == string.Empty)
- return;
-
Hashtable xmlrpcdata = new Hashtable();
xmlrpcdata["RegionUUID"] = scene.RegionInfo.RegionID.ToString();
ArrayList SendParams = new ArrayList();
--
cgit v1.1
From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Thu, 1 Oct 2009 01:00:09 +0900
Subject: Formatting cleanup.
---
.../Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
index 66f1e14..9a68749 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{
public class InstantMessageModule : IRegionModule
{
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
/// Is this module enabled?
--
cgit v1.1