diff options
author | Adam Frisby | 2008-05-01 18:04:42 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 18:04:42 +0000 |
commit | 20a9bf08f51351e1e0a9de94f184ff56cd572665 (patch) | |
tree | 52da64dab26353b903c8e4befed0178fa72a188b /OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs | |
parent | More config cleanup in LaunchSLClient. (diff) | |
download | opensim-SC-20a9bf08f51351e1e0a9de94f184ff56cd572665.zip opensim-SC-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.gz opensim-SC-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.bz2 opensim-SC-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.xz |
* Rolled back a few changes.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs index f39f16d..c828ef0 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs | |||
@@ -120,9 +120,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL | |||
120 | 120 | ||
121 | private void MakeHttpRequest(string url, LLUUID requestID) | 121 | private void MakeHttpRequest(string url, LLUUID requestID) |
122 | { | 122 | { |
123 | WebRequest request = WebRequest.Create(url); | 123 | WebRequest request = HttpWebRequest.Create(url); |
124 | RequestState state = new RequestState((HttpWebRequest) request, requestID); | 124 | RequestState state = new RequestState((HttpWebRequest) request, requestID); |
125 | IAsyncResult result = request.BeginGetResponse(HttpRequestReturn, state); | 125 | IAsyncResult result = request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state); |
126 | 126 | ||
127 | TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1)); | 127 | TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1)); |
128 | state.TimeOfRequest = (int) t.TotalSeconds; | 128 | state.TimeOfRequest = (int) t.TotalSeconds; |
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL | |||
131 | private void HttpRequestReturn(IAsyncResult result) | 131 | private void HttpRequestReturn(IAsyncResult result) |
132 | { | 132 | { |
133 | RequestState state = (RequestState) result.AsyncState; | 133 | RequestState state = (RequestState) result.AsyncState; |
134 | WebRequest request = state.Request; | 134 | WebRequest request = (WebRequest) state.Request; |
135 | HttpWebResponse response = (HttpWebResponse) request.EndGetResponse(result); | 135 | HttpWebResponse response = (HttpWebResponse) request.EndGetResponse(result); |
136 | if (response.StatusCode == HttpStatusCode.OK) | 136 | if (response.StatusCode == HttpStatusCode.OK) |
137 | { | 137 | { |
@@ -175,9 +175,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL | |||
175 | 175 | ||
176 | public class RequestState | 176 | public class RequestState |
177 | { | 177 | { |
178 | public HttpWebRequest Request; | 178 | public HttpWebRequest Request = null; |
179 | public LLUUID RequestID = LLUUID.Zero; | 179 | public LLUUID RequestID = LLUUID.Zero; |
180 | public int TimeOfRequest; | 180 | public int TimeOfRequest = 0; |
181 | 181 | ||
182 | public RequestState(HttpWebRequest request, LLUUID requestID) | 182 | public RequestState(HttpWebRequest request, LLUUID requestID) |
183 | { | 183 | { |