diff options
author | Diva Canto | 2011-04-28 20:19:54 -0700 |
---|---|---|
committer | Diva Canto | 2011-04-28 20:19:54 -0700 |
commit | 9892e115ccdcc8567087041917fb5c7694aa8836 (patch) | |
tree | 096a7474e5f081067f5b08b7acb1ba8d8cffc494 /OpenSim/Server/Handlers | |
parent | One less [Serializable] -- ClientInfo. (diff) | |
download | opensim-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/Server/Handlers')
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 372a59c..8b6fb4f 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -50,6 +50,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
50 | public class AgentHandler | 50 | public class AgentHandler |
51 | { | 51 | { |
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | |||
53 | private ISimulationService m_SimulationService; | 54 | private ISimulationService m_SimulationService; |
54 | 55 | ||
55 | protected bool m_Proxy = false; | 56 | protected bool m_Proxy = false; |
@@ -275,7 +276,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
275 | AgentData agent = new AgentData(); | 276 | AgentData agent = new AgentData(); |
276 | try | 277 | try |
277 | { | 278 | { |
278 | agent.Unpack(args); | 279 | agent.Unpack(args, m_SimulationService.GetScene(destination.RegionHandle)); |
279 | } | 280 | } |
280 | catch (Exception ex) | 281 | catch (Exception ex) |
281 | { | 282 | { |
@@ -295,7 +296,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
295 | AgentPosition agent = new AgentPosition(); | 296 | AgentPosition agent = new AgentPosition(); |
296 | try | 297 | try |
297 | { | 298 | { |
298 | agent.Unpack(args); | 299 | agent.Unpack(args, m_SimulationService.GetScene(destination.RegionHandle)); |
299 | } | 300 | } |
300 | catch (Exception ex) | 301 | catch (Exception ex) |
301 | { | 302 | { |
@@ -342,7 +343,8 @@ namespace OpenSim.Server.Handlers.Simulation | |||
342 | destination.RegionID = regionID; | 343 | destination.RegionID = regionID; |
343 | 344 | ||
344 | string reason; | 345 | string reason; |
345 | bool result = m_SimulationService.QueryAccess(destination, id, position, out reason); | 346 | string version; |
347 | bool result = m_SimulationService.QueryAccess(destination, id, position, out version, out reason); | ||
346 | 348 | ||
347 | responsedata["int_response_code"] = HttpStatusCode.OK; | 349 | responsedata["int_response_code"] = HttpStatusCode.OK; |
348 | 350 | ||
@@ -350,6 +352,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
350 | 352 | ||
351 | resp["success"] = OSD.FromBoolean(result); | 353 | resp["success"] = OSD.FromBoolean(result); |
352 | resp["reason"] = OSD.FromString(reason); | 354 | resp["reason"] = OSD.FromString(reason); |
355 | resp["version"] = OSD.FromString(version); | ||
353 | 356 | ||
354 | responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); | 357 | responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); |
355 | } | 358 | } |