aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs15
-rw-r--r--OpenSim/Services/Connectors/Estate/EstateDataConnector.cs18
-rw-r--r--OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs3
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs3
4 files changed, 28 insertions, 11 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 7e81be7..205426e 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -29,6 +29,7 @@ using log4net;
29using System; 29using System;
30using System.Threading; 30using System.Threading;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections.Concurrent;
32using System.IO; 33using System.IO;
33using System.Reflection; 34using System.Reflection;
34using System.Timers; 35using System.Timers;
@@ -352,8 +353,7 @@ namespace OpenSim.Services.Connectors
352 public string id; 353 public string id;
353 } 354 }
354 355
355 private OpenSim.Framework.BlockingQueue<QueuedAssetRequest> m_requestQueue = 356 private BlockingCollection<QueuedAssetRequest> m_requestQueue = new BlockingCollection<QueuedAssetRequest>();
356 new OpenSim.Framework.BlockingQueue<QueuedAssetRequest>();
357 357
358 private void AssetRequestProcessor() 358 private void AssetRequestProcessor()
359 { 359 {
@@ -361,10 +361,13 @@ namespace OpenSim.Services.Connectors
361 361
362 while (true) 362 while (true)
363 { 363 {
364 r = m_requestQueue.Dequeue(4500); 364 if(!m_requestQueue.TryTake(out r, 4500) || r == null)
365 Watchdog.UpdateThread(); 365 {
366 if(r== null) 366 Watchdog.UpdateThread();
367 continue; 367 continue;
368 }
369
370 Watchdog.UpdateThread();
368 string uri = r.uri; 371 string uri = r.uri;
369 string id = r.id; 372 string id = r.id;
370 373
@@ -432,7 +435,7 @@ namespace OpenSim.Services.Connectors
432 QueuedAssetRequest request = new QueuedAssetRequest(); 435 QueuedAssetRequest request = new QueuedAssetRequest();
433 request.id = id; 436 request.id = id;
434 request.uri = uri; 437 request.uri = uri;
435 m_requestQueue.Enqueue(request); 438 m_requestQueue.Add(request);
436 } 439 }
437 } 440 }
438 else 441 else
diff --git a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs
index b9a6281..0971b38 100644
--- a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs
+++ b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs
@@ -195,6 +195,14 @@ namespace OpenSim.Services.Connectors
195 string uri = m_ServerURI + string.Format("/estates/estate/?region={0}&create={1}", regionID, create); 195 string uri = m_ServerURI + string.Format("/estates/estate/?region={0}&create={1}", regionID, create);
196 196
197 reply = MakeRequest("GET", uri, string.Empty); 197 reply = MakeRequest("GET", uri, string.Empty);
198 if(reply == null)
199 {
200 // this is a fatal error
201 m_log.DebugFormat("[ESTATE CONNECTOR] connection to remote estates service failed");
202 m_log.DebugFormat("[ESTATE CONNECTOR] simulator needs to terminate");
203 Environment.Exit(-1);
204 }
205
198 if (String.IsNullOrEmpty(reply)) 206 if (String.IsNullOrEmpty(reply))
199 return null; 207 return null;
200 208
@@ -308,7 +316,8 @@ namespace OpenSim.Services.Connectors
308 string reply = string.Empty; 316 string reply = string.Empty;
309 try 317 try
310 { 318 {
311 reply = SynchronousRestFormsRequester.MakeRequest(verb, uri, formdata, m_Auth); 319 reply = SynchronousRestFormsRequester.MakeRequest(verb, uri, formdata, 30, m_Auth);
320 return reply;
312 } 321 }
313 catch (WebException e) 322 catch (WebException e)
314 { 323 {
@@ -317,14 +326,17 @@ namespace OpenSim.Services.Connectors
317 if (hwr != null) 326 if (hwr != null)
318 { 327 {
319 if (hwr.StatusCode == HttpStatusCode.NotFound) 328 if (hwr.StatusCode == HttpStatusCode.NotFound)
329 {
320 m_log.Error(string.Format("[ESTATE CONNECTOR]: Resource {0} not found ", uri)); 330 m_log.Error(string.Format("[ESTATE CONNECTOR]: Resource {0} not found ", uri));
331 return reply;
332 }
321 if (hwr.StatusCode == HttpStatusCode.Unauthorized) 333 if (hwr.StatusCode == HttpStatusCode.Unauthorized)
322 m_log.Error(string.Format("[ESTATE CONNECTOR]: Web request {0} requires authentication ", uri)); 334 m_log.Error(string.Format("[ESTATE CONNECTOR]: Web request {0} requires authentication ", uri));
323 } 335 }
324 else 336 else
325 m_log.Error(string.Format( 337 m_log.Error(string.Format(
326 "[ESTATE CONNECTOR]: WebException for {0} {1} {2} {3}", 338 "[ESTATE CONNECTOR]: WebException for {0} {1} {2} {3}",
327 verb, uri, formdata, e)); 339 verb, uri, formdata, e.Message));
328 } 340 }
329 } 341 }
330 catch (Exception e) 342 catch (Exception e)
@@ -332,7 +344,7 @@ namespace OpenSim.Services.Connectors
332 m_log.DebugFormat("[ESTATE CONNECTOR]: Exception when contacting estate server at {0}: {1}", uri, e.Message); 344 m_log.DebugFormat("[ESTATE CONNECTOR]: Exception when contacting estate server at {0}: {1}", uri, e.Message);
333 } 345 }
334 346
335 return reply; 347 return null;
336 } 348 }
337 } 349 }
338} 350}
diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs
index 84c4efe..762d2f7 100644
--- a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs
+++ b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs
@@ -229,6 +229,7 @@ namespace OpenSim.Services.Connectors
229 string reply = SynchronousRestFormsRequester.MakeRequest("POST", 229 string reply = SynchronousRestFormsRequester.MakeRequest("POST",
230 uri, 230 uri,
231 reqString, 231 reqString,
232 30,
232 m_Auth); 233 m_Auth);
233 if (reply != string.Empty) 234 if (reply != string.Empty)
234 { 235 {
@@ -271,7 +272,7 @@ namespace OpenSim.Services.Connectors
271 { 272 {
272 // This just dumps a warning for any operation that takes more than 100 ms 273 // This just dumps a warning for any operation that takes more than 100 ms
273 int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); 274 int tickdiff = Util.EnvironmentTickCountSubtract(tickstart);
274 m_log.DebugFormat("[MAP IMAGE CONNECTOR]: map tile uploaded in {0}ms", tickdiff); 275 m_log.DebugFormat("[MAP IMAGE CONNECTOR]: map tile upload time {0}ms", tickdiff);
275 } 276 }
276 277
277 return false; 278 return false;
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
index 5f075ac..9f3b94c 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
@@ -151,7 +151,8 @@ namespace OpenSim.Services.Connectors
151 os.Write(buffer, 0, strBuffer.Length); //Send it 151 os.Write(buffer, 0, strBuffer.Length); //Send it
152 //m_log.InfoFormat("[REST COMMS]: Posted HelloNeighbour request to remote sim {0}", uri); 152 //m_log.InfoFormat("[REST COMMS]: Posted HelloNeighbour request to remote sim {0}", uri);
153 } 153 }
154 catch (Exception e) 154// catch (Exception e)
155 catch
155 { 156 {
156// m_log.WarnFormat( 157// m_log.WarnFormat(
157// "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}", 158// "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}",