aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs28
1 files changed, 16 insertions, 12 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index 4908c2c..f76ea74 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -144,31 +144,34 @@ namespace OpenSim.Region.ClientStack.Linden
144 public PollServiceInventoryEventArgs(UUID pId) : 144 public PollServiceInventoryEventArgs(UUID pId) :
145 base(null, null, null, null, pId, 30000) 145 base(null, null, null, null, pId, 30000)
146 { 146 {
147 HasEvents = (x, y) => { return this.responses.ContainsKey(x); }; 147 HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); };
148 GetEvents = (x, y, s) => 148 GetEvents = (x, y, s) =>
149 { 149 {
150 try 150 lock (responses)
151 { 151 {
152 return this.responses[x]; 152 try
153 } 153 {
154 finally 154 return responses[x];
155 { 155 }
156 responses.Remove(x); 156 finally
157 {
158 responses.Remove(x);
159 }
157 } 160 }
158 }; 161 };
159 162
160 Request = (x, y) => 163 Request = (x, y) =>
161 { 164 {
162 y["RequestID"] = x.ToString(); 165 y["RequestID"] = x.ToString();
163 lock (this.requests) 166 lock (requests)
164 this.requests.Add(y); 167 requests.Add(y);
165 168
166 m_queue.Enqueue(this); 169 m_queue.Enqueue(this);
167 }; 170 };
168 171
169 NoEvents = (x, y) => 172 NoEvents = (x, y) =>
170 { 173 {
171 lock (this.requests) 174 lock (requests)
172 { 175 {
173 Hashtable request = requests.Find(id => id["RequestID"].ToString() == x.ToString()); 176 Hashtable request = requests.Find(id => id["RequestID"].ToString() == x.ToString());
174 requests.Remove(request); 177 requests.Remove(request);
@@ -192,7 +195,7 @@ namespace OpenSim.Region.ClientStack.Linden
192 195
193 try 196 try
194 { 197 {
195 lock (this.requests) 198 lock (requests)
196 { 199 {
197 request = requests[0]; 200 request = requests[0];
198 requests.RemoveAt(0); 201 requests.RemoveAt(0);
@@ -214,7 +217,8 @@ namespace OpenSim.Region.ClientStack.Linden
214 217
215 response["str_response_string"] = m_webFetchHandler.FetchInventoryDescendentsRequest(request["body"].ToString(), String.Empty, String.Empty, null, null); 218 response["str_response_string"] = m_webFetchHandler.FetchInventoryDescendentsRequest(request["body"].ToString(), String.Empty, String.Empty, null, null);
216 219
217 responses[requestID] = response; 220 lock (responses)
221 responses[requestID] = response;
218 } 222 }
219 } 223 }
220 224