aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-25 01:41:00 +0100
committerJustin Clark-Casey (justincc)2012-05-25 01:41:00 +0100
commit7cceab12956dcb8ebeff129375888541831f7976 (patch)
tree650baa934c0da9d18273fccd16f344d12bf07a72 /OpenSim/Server
parentDon't actually proceed on a within-region teleport if another is already taki... (diff)
downloadopensim-SC_OLD-7cceab12956dcb8ebeff129375888541831f7976.zip
opensim-SC_OLD-7cceab12956dcb8ebeff129375888541831f7976.tar.gz
opensim-SC_OLD-7cceab12956dcb8ebeff129375888541831f7976.tar.bz2
opensim-SC_OLD-7cceab12956dcb8ebeff129375888541831f7976.tar.xz
In remote QueryAccess, also receive the actual status (true|false) instead of always true no matter what the callee actually returned.
This was due to two things 1) SimulationServiceConnector.QueryAccess was always looking to the outer result["success"]. But if a "_Result" map is returned (which is certainly the case right now), then the true success is _Result["success"], result["success"] is always true no matter what 2) If QueryAccess was false at the destination, then AgentHandlers.DoQueryAccess() was never putting this in the result. The default action of SerializeJsonString() is not to put false booleans in the JSON!!!, so this has to be explicitly set.
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 99ae7f0..012b14e 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -144,13 +144,16 @@ namespace OpenSim.Server.Handlers.Simulation
144 144
145 responsedata["int_response_code"] = HttpStatusCode.OK; 145 responsedata["int_response_code"] = HttpStatusCode.OK;
146 146
147 OSDMap resp = new OSDMap(2); 147 OSDMap resp = new OSDMap(3);
148 148
149 resp["success"] = OSD.FromBoolean(result); 149 resp["success"] = OSD.FromBoolean(result);
150 resp["reason"] = OSD.FromString(reason); 150 resp["reason"] = OSD.FromString(reason);
151 resp["version"] = OSD.FromString(version); 151 resp["version"] = OSD.FromString(version);
152 152
153 responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp); 153 // We must preserve defaults here, otherwise a false "success" will not be put into the JSON map!
154 responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
155
156// Console.WriteLine("str_response_string [{0}]", responsedata["str_response_string"]);
154 } 157 }
155 158
156 protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID) 159 protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID)