aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorDiva Canto2011-04-28 20:19:54 -0700
committerDiva Canto2011-04-28 20:19:54 -0700
commit9892e115ccdcc8567087041917fb5c7694aa8836 (patch)
tree096a7474e5f081067f5b08b7acb1ba8d8cffc494 /OpenSim/Services
parentOne less [Serializable] -- ClientInfo. (diff)
downloadopensim-SC_OLD-9892e115ccdcc8567087041917fb5c7694aa8836.zip
opensim-SC_OLD-9892e115ccdcc8567087041917fb5c7694aa8836.tar.gz
opensim-SC_OLD-9892e115ccdcc8567087041917fb5c7694aa8836.tar.bz2
opensim-SC_OLD-9892e115ccdcc8567087041917fb5c7694aa8836.tar.xz
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.
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs19
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs2
2 files changed, 13 insertions, 8 deletions
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
241 if (args != null) 241 if (args != null)
242 { 242 {
243 agent = new CompleteAgentData(); 243 agent = new CompleteAgentData();
244 agent.Unpack(args); 244 agent.Unpack(args, null);
245 return true; 245 return true;
246 } 246 }
247 } 247 }
@@ -256,9 +256,10 @@ namespace OpenSim.Services.Connectors.Simulation
256 256
257 /// <summary> 257 /// <summary>
258 /// </summary> 258 /// </summary>
259 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason) 259 public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason)
260 { 260 {
261 reason = "Failed to contact destination"; 261 reason = "Failed to contact destination";
262 version = "Unknown";
262 263
263 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position); 264 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess start, position={0}", position);
264 265
@@ -274,23 +275,27 @@ namespace OpenSim.Services.Connectors.Simulation
274 try 275 try
275 { 276 {
276 OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000); 277 OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 10000);
278 OSDMap data = (OSDMap)result["_Result"];
279
277 bool success = result["success"].AsBoolean(); 280 bool success = result["success"].AsBoolean();
278 reason = result["reason"].AsString(); 281 reason = data["reason"].AsString();
282 if (data["version"] != null)
283 version = data["version"].AsString();
279 284
280 //m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}", uri, success); 285 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString());
281 286
282 if (!success) 287 if (!success)
283 { 288 {
284 if (result.ContainsKey("Message")) 289 if (data.ContainsKey("Message"))
285 { 290 {
286 string message = result["Message"].AsString(); 291 string message = data["Message"].AsString();
287 if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region 292 if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region
288 { 293 {
289 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"); 294 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");
290 return true; 295 return true;
291 } 296 }
292 297
293 reason = result["Message"]; 298 reason = data["Message"];
294 } 299 }
295 else 300 else
296 { 301 {
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
67 67
68 bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent); 68 bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent);
69 69
70 bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason); 70 bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason);
71 71
72 /// <summary> 72 /// <summary>
73 /// Message from receiving region to departing region, telling it got contacted by the client. 73 /// Message from receiving region to departing region, telling it got contacted by the client.