aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs30
1 files changed, 21 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
index 1097ca0..d62734f 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
@@ -72,18 +72,30 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
72 // implemented here yet anyway. Should be fixed if/when maxsize 72 // implemented here yet anyway. Should be fixed if/when maxsize
73 // is supported 73 // is supported
74 74
75 if (m_CmdManager.m_ScriptEngine.m_ScriptManager.GetScript(httpInfo.localID, httpInfo.itemID) != null) 75 bool handled = false;
76 iHttpReq.RemoveCompletedRequest(httpInfo.reqID);
77 foreach (ScriptEngine sman in ScriptEngine.ScriptEngines)
76 { 78 {
77 iHttpReq.RemoveCompletedRequest(httpInfo.reqID); 79 if (sman.m_ScriptManager.GetScript(httpInfo.localID, httpInfo.itemID) != null)
78 object[] resobj = new object[]
79 { 80 {
80 httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body 81 object[] resobj = new object[]
81 }; 82 {
83 httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body
84 };
82 85
83 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 86 sman.m_EventQueueManager.AddToScriptQueue(
84 httpInfo.localID, httpInfo.itemID, "http_response", EventQueueManager.llDetectNull, resobj 87 httpInfo.localID, httpInfo.itemID, "http_response", EventQueueManager.llDetectNull, resobj
85 ); 88 );
86 //Thread.Sleep(2500); 89
90 handled = true;
91 break;
92 //Thread.Sleep(2500);
93 }
94 }
95
96 if (!handled)
97 {
98 Console.WriteLine("Unhandled http_response: " + httpInfo.reqID);
87 } 99 }
88 100
89 httpInfo = iHttpReq.GetNextCompletedRequest(); 101 httpInfo = iHttpReq.GetNextCompletedRequest();