From bbe41c75e17764a238f301bfdebdc095cc4a64cd Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 1 May 2011 09:30:23 -0700
Subject: Fixed confusing OSDMap that comes as the response of QueryAccess in
the case it fails.
---
.../Simulation/SimulationServiceConnector.cs | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Services/Connectors')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 7545db8..5cb8269 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -275,27 +275,30 @@ 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 = data["reason"].AsString();
- if (data["version"] != null && data["version"].AsString() != string.Empty)
- version = data["version"].AsString();
+ if (result.ContainsKey("_Result"))
+ {
+ OSDMap data = (OSDMap)result["_Result"];
- m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString());
+ reason = data["reason"].AsString();
+ if (data["version"] != null && data["version"].AsString() != string.Empty)
+ version = data["version"].AsString();
+
+ m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString());
+ }
if (!success)
{
- if (data.ContainsKey("Message"))
+ if (result.ContainsKey("Message"))
{
- string message = data["Message"].AsString();
+ string message = result["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 = data["Message"];
+ reason = result["Message"];
}
else
{
--
cgit v1.1
From 8cc547c2776f957abd0fa09c33c02bf42de70340 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 2 May 2011 09:04:34 -0700
Subject: Turns out that it's a bad idea to let Agent position updates linger
for a long time on certain versions of mono. It's better to abort them if
they take too long. So timeout is now an argument. Currently: 20secs for
CreateAgent, 100secs for UpdateAgent (fat), 10 secs for UpdateAgent
(Position); all of these divided by 4, for ReadWrite, as Mic had before.
---
.../Connectors/Simulation/SimulationServiceConnector.cs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Services/Connectors')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 5cb8269..0f2ced1 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -102,7 +102,7 @@ namespace OpenSim.Services.Connectors.Simulation
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
args["teleport_flags"] = OSD.FromString(flags.ToString());
- OSDMap result = WebUtil.PostToService(uri,args);
+ OSDMap result = WebUtil.PostToService(uri, args, 20000);
if (result["Success"].AsBoolean())
return true;
@@ -126,7 +126,7 @@ namespace OpenSim.Services.Connectors.Simulation
///
public bool UpdateAgent(GridRegion destination, AgentData data)
{
- return UpdateAgent(destination, (IAgentData)data);
+ return UpdateAgent(destination, (IAgentData)data, 100000); // yes, 100 seconds
}
///
@@ -181,7 +181,7 @@ namespace OpenSim.Services.Connectors.Simulation
}
}
- UpdateAgent(destination,(IAgentData)pos);
+ UpdateAgent(destination, (IAgentData)pos, 10000);
}
// unreachable
@@ -191,7 +191,7 @@ namespace OpenSim.Services.Connectors.Simulation
///
/// This is the worker function to send AgentData to a neighbor region
///
- private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
+ private bool UpdateAgent(GridRegion destination, IAgentData cAgentData, int timeout)
{
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: UpdateAgent start");
@@ -207,7 +207,7 @@ namespace OpenSim.Services.Connectors.Simulation
args["destination_name"] = OSD.FromString(destination.RegionName);
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
- OSDMap result = WebUtil.PutToService(uri,args);
+ OSDMap result = WebUtil.PutToService(uri, args, timeout);
return result["Success"].AsBoolean();
}
catch (Exception e)
@@ -233,7 +233,7 @@ namespace OpenSim.Services.Connectors.Simulation
try
{
- OSDMap result = WebUtil.GetFromService(uri);
+ OSDMap result = WebUtil.GetFromService(uri, 10000);
if (result["Success"].AsBoolean())
{
// OSDMap args = Util.GetOSDMap(result["_RawResult"].AsString());
@@ -392,7 +392,7 @@ namespace OpenSim.Services.Connectors.Simulation
args["destination_name"] = OSD.FromString(destination.RegionName);
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
- WebUtil.PostToService(uri, args);
+ WebUtil.PostToService(uri, args, 40000);
}
catch (Exception e)
{
--
cgit v1.1
From 51d0b8b4e9179d5dbfd289a34e7103d2889c4b71 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 2 May 2011 09:06:21 -0700
Subject: Oops, forgot this one.
---
OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Services/Connectors')
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 8ab323a..0430ef6 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -314,7 +314,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
args["teleport_flags"] = OSD.FromString(flags.ToString());
- OSDMap result = WebUtil.PostToService(uri,args);
+ OSDMap result = WebUtil.PostToService(uri, args, 20000);
if (result["Success"].AsBoolean())
{
OSDMap unpacked = (OSDMap)result["_Result"];
--
cgit v1.1
From f7d37201265b45ce8449c1361fa51928931d6bfd Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 2 May 2011 09:20:08 -0700
Subject: Increased timeout for fat UpdateAgent to 200secs. Nebadon's 3800-prim
alien avatar takes 6secs to transfer between sims on the same machine...
---
OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Services/Connectors')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 0f2ced1..cef6473 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Services.Connectors.Simulation
///
public bool UpdateAgent(GridRegion destination, AgentData data)
{
- return UpdateAgent(destination, (IAgentData)data, 100000); // yes, 100 seconds
+ return UpdateAgent(destination, (IAgentData)data, 200000); // yes, 200 seconds
}
///
--
cgit v1.1