diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs index 9d4e0fa..bf21dd3 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs | |||
@@ -231,16 +231,33 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
231 | 231 | ||
232 | public void RemoteDataReply(string channel, string message_id, string sdata, int idata) | 232 | public void RemoteDataReply(string channel, string message_id, string sdata, int idata) |
233 | { | 233 | { |
234 | RPCRequestInfo rpcInfo; | ||
235 | LLUUID message_key = new LLUUID(message_id); | 234 | LLUUID message_key = new LLUUID(message_id); |
235 | LLUUID channel_key = new LLUUID(channel); | ||
236 | 236 | ||
237 | if (m_rpcPendingResponses.TryGetValue(message_key, out rpcInfo)) | 237 | RPCRequestInfo rpcInfo = null; |
238 | |||
239 | if (message_key == LLUUID.Zero) | ||
240 | { | ||
241 | foreach (RPCRequestInfo oneRpcInfo in m_rpcPendingResponses.Values) | ||
242 | if (oneRpcInfo.GetChannelKey() == channel_key) | ||
243 | rpcInfo = oneRpcInfo; | ||
244 | } | ||
245 | else | ||
246 | { | ||
247 | m_rpcPendingResponses.TryGetValue(message_key, out rpcInfo); | ||
248 | } | ||
249 | |||
250 | if (rpcInfo != null) | ||
238 | { | 251 | { |
239 | rpcInfo.SetStrRetval(sdata); | 252 | rpcInfo.SetStrRetval(sdata); |
240 | rpcInfo.SetIntRetval(idata); | 253 | rpcInfo.SetIntRetval(idata); |
241 | rpcInfo.SetProcessed(true); | 254 | rpcInfo.SetProcessed(true); |
242 | m_rpcPendingResponses.Remove(message_key); | 255 | m_rpcPendingResponses.Remove(message_key); |
243 | } | 256 | } |
257 | else | ||
258 | { | ||
259 | m_log.Warn("[RemoteDataReply]: Channel or message_id not found"); | ||
260 | } | ||
244 | } | 261 | } |
245 | 262 | ||
246 | /********************************************** | 263 | /********************************************** |
@@ -378,7 +395,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
378 | RPCChannelInfo rpcChanInfo; | 395 | RPCChannelInfo rpcChanInfo; |
379 | if (m_openChannels.TryGetValue(channel, out rpcChanInfo)) | 396 | if (m_openChannels.TryGetValue(channel, out rpcChanInfo)) |
380 | { | 397 | { |
381 | string intVal = (string) requestData["IntValue"]; | 398 | string intVal = Convert.ToInt32(requestData["IntValue"]).ToString(); |
382 | string strVal = (string) requestData["StringValue"]; | 399 | string strVal = (string) requestData["StringValue"]; |
383 | 400 | ||
384 | RPCRequestInfo rpcInfo; | 401 | RPCRequestInfo rpcInfo; |
@@ -402,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
402 | { | 419 | { |
403 | Hashtable param = new Hashtable(); | 420 | Hashtable param = new Hashtable(); |
404 | param["StringValue"] = rpcInfo.GetStrRetval(); | 421 | param["StringValue"] = rpcInfo.GetStrRetval(); |
405 | param["IntValue"] = Convert.ToString(rpcInfo.GetIntRetval()); | 422 | param["IntValue"] = rpcInfo.GetIntRetval(); |
406 | 423 | ||
407 | ArrayList parameters = new ArrayList(); | 424 | ArrayList parameters = new ArrayList(); |
408 | parameters.Add(param); | 425 | parameters.Add(param); |
@@ -669,4 +686,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
669 | return reqID; | 686 | return reqID; |
670 | } | 687 | } |
671 | } | 688 | } |
672 | } \ No newline at end of file | 689 | } |