From 9892e115ccdcc8567087041917fb5c7694aa8836 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 28 Apr 2011 20:19:54 -0700
Subject: Fatpack message on agent transfers: 1 message only (UpdateAgent)
containing the agent and all attachments. Preserves backwards compatibility
-- older sims get passed attachments one by one. Meaning that I finally
introduced versioning in the simulation service.
---
.../Simulation/SimulationServiceConnector.cs | 19 ++++++++++++-------
OpenSim/Services/Interfaces/ISimulationService.cs | 2 +-
2 files changed, 13 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 93b3ae6..415b4f0 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -241,7 +241,7 @@ namespace OpenSim.Services.Connectors.Simulation
if (args != null)
{
agent = new CompleteAgentData();
- agent.Unpack(args);
+ agent.Unpack(args, null);
return true;
}
}
@@ -256,9 +256,10 @@ namespace OpenSim.Services.Connectors.Simulation
///
///
- public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason)
+ public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason)
{
reason = "Failed to contact destination";
+ version = "Unknown";
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position);
@@ -274,23 +275,27 @@ namespace OpenSim.Services.Connectors.Simulation
try
{
OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000);
+ OSDMap data = (OSDMap)result["_Result"];
+
bool success = result["success"].AsBoolean();
- reason = result["reason"].AsString();
+ reason = data["reason"].AsString();
+ if (data["version"] != null)
+ version = data["version"].AsString();
- //m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}", uri, success);
+ m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString());
if (!success)
{
- if (result.ContainsKey("Message"))
+ if (data.ContainsKey("Message"))
{
- string message = result["Message"].AsString();
+ string message = data["Message"].AsString();
if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region
{
m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored");
return true;
}
- reason = result["Message"];
+ reason = data["Message"];
}
else
{
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 55c9cc5..5f9ce6d 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Services.Interfaces
bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent);
- bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason);
+ bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason);
///
/// Message from receiving region to departing region, telling it got contacted by the client.
--
cgit v1.1