diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 20 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 13 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 29 |
6 files changed, 45 insertions, 25 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index ad98816..afc4060 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -29,14 +29,15 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Net.Sockets; | 31 | using System.Net.Sockets; |
32 | using System.Reflection; | ||
32 | using System.Xml; | 33 | using System.Xml; |
33 | using System.IO; | 34 | using System.IO; |
35 | using log4net; | ||
34 | using Nini.Config; | 36 | using Nini.Config; |
35 | using OpenMetaverse; | 37 | using OpenMetaverse; |
36 | using OpenMetaverse.StructuredData; | 38 | using OpenMetaverse.StructuredData; |
37 | using OpenSim.Framework.Console; | 39 | using OpenSim.Framework.Console; |
38 | 40 | ||
39 | |||
40 | namespace OpenSim.Framework | 41 | namespace OpenSim.Framework |
41 | { | 42 | { |
42 | public class RegionLightShareData : ICloneable | 43 | public class RegionLightShareData : ICloneable |
@@ -96,10 +97,9 @@ namespace OpenSim.Framework | |||
96 | 97 | ||
97 | [Serializable] | 98 | [Serializable] |
98 | public class SimpleRegionInfo | 99 | public class SimpleRegionInfo |
99 | { | 100 | { |
100 | // private static readonly log4net.ILog m_log | 101 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
101 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 102 | |
102 | |||
103 | /// <summary> | 103 | /// <summary> |
104 | /// The port by which http communication occurs with the region (most noticeably, CAPS communication) | 104 | /// The port by which http communication occurs with the region (most noticeably, CAPS communication) |
105 | /// </summary> | 105 | /// </summary> |
@@ -327,8 +327,7 @@ namespace OpenSim.Framework | |||
327 | 327 | ||
328 | public class RegionInfo | 328 | public class RegionInfo |
329 | { | 329 | { |
330 | // private static readonly log4net.ILog m_log | 330 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
331 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
332 | 331 | ||
333 | public bool commFailTF = false; | 332 | public bool commFailTF = false; |
334 | public ConfigurationMember configMember; | 333 | public ConfigurationMember configMember; |
@@ -772,9 +771,16 @@ namespace OpenSim.Framework | |||
772 | } | 771 | } |
773 | 772 | ||
774 | if (externalName == "SYSTEMIP") | 773 | if (externalName == "SYSTEMIP") |
774 | { | ||
775 | m_externalHostName = Util.GetLocalHost().ToString(); | 775 | m_externalHostName = Util.GetLocalHost().ToString(); |
776 | m_log.InfoFormat( | ||
777 | "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", | ||
778 | m_externalHostName, name); | ||
779 | } | ||
776 | else | 780 | else |
781 | { | ||
777 | m_externalHostName = externalName; | 782 | m_externalHostName = externalName; |
783 | } | ||
778 | 784 | ||
779 | m_regionType = config.GetString("RegionType", String.Empty); | 785 | m_regionType = config.GetString("RegionType", String.Empty); |
780 | 786 | ||
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index a6e00c2..8123f2f 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -310,7 +310,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
310 | } | 310 | } |
311 | catch (Exception e) | 311 | catch (Exception e) |
312 | { | 312 | { |
313 | m_log.Error(string.Format("[BASE HTTP SERVER]: OnRequest() failed with "), e); | 313 | m_log.ErrorFormat("[BASE HTTP SERVER]: OnRequest() failed with {0}{1}", e.Message, e.StackTrace); |
314 | } | 314 | } |
315 | } | 315 | } |
316 | 316 | ||
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 94862a6..e20866e 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -114,7 +114,7 @@ namespace OpenSim.Framework | |||
114 | } | 114 | } |
115 | catch (Exception ex) | 115 | catch (Exception ex) |
116 | { | 116 | { |
117 | m_log.Warn("GET from URL " + url + " failed: " + ex.Message); | 117 | m_log.Warn(httpVerb + " on URL " + url + " failed: " + ex.Message); |
118 | errorMessage = ex.Message; | 118 | errorMessage = ex.Message; |
119 | } | 119 | } |
120 | 120 | ||
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 75561a7..cb48ac1 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -192,9 +192,7 @@ namespace OpenSim | |||
192 | // Hook up to the watchdog timer | 192 | // Hook up to the watchdog timer |
193 | Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; | 193 | Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; |
194 | 194 | ||
195 | PrintFileToConsole("startuplogo.txt"); | 195 | PrintFileToConsole("startuplogo.txt"); |
196 | |||
197 | m_log.InfoFormat("[NETWORK]: Using {0} as SYSTEMIP", Util.GetLocalHost().ToString()); | ||
198 | 196 | ||
199 | // For now, start at the 'root' level by default | 197 | // For now, start at the 'root' level by default |
200 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it | 198 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 904e38a..ce7b0eb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -659,7 +659,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
659 | if (!Entities.Remove(agentID)) | 659 | if (!Entities.Remove(agentID)) |
660 | { | 660 | { |
661 | m_log.WarnFormat( | 661 | m_log.WarnFormat( |
662 | "[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", | 662 | "[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", |
663 | agentID); | 663 | agentID); |
664 | } | 664 | } |
665 | 665 | ||
@@ -668,12 +668,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
668 | { | 668 | { |
669 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); | 669 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); |
670 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); | 670 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); |
671 | 671 | ||
672 | // Remember the old presene reference from the dictionary | ||
673 | ScenePresence oldref = newmap[agentID]; | ||
674 | // Remove the presence reference from the dictionary | 672 | // Remove the presence reference from the dictionary |
675 | if (newmap.Remove(agentID)) | 673 | if (newmap.ContainsKey(agentID)) |
676 | { | 674 | { |
675 | ScenePresence oldref = newmap[agentID]; | ||
676 | newmap.Remove(agentID); | ||
677 | |||
677 | // Find the index in the list where the old ref was stored and remove the reference | 678 | // Find the index in the list where the old ref was stored and remove the reference |
678 | newlist.RemoveAt(newlist.IndexOf(oldref)); | 679 | newlist.RemoveAt(newlist.IndexOf(oldref)); |
679 | // Swap out the dictionary and list with new references | 680 | // Swap out the dictionary and list with new references |
@@ -682,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
682 | } | 683 | } |
683 | else | 684 | else |
684 | { | 685 | { |
685 | m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); | 686 | m_log.WarnFormat("[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); |
686 | } | 687 | } |
687 | } | 688 | } |
688 | finally | 689 | finally |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 3fdee9c..34bb8b3 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -371,18 +371,33 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
371 | /// <returns></returns> | 371 | /// <returns></returns> |
372 | public bool Delete(string id) | 372 | public bool Delete(string id) |
373 | { | 373 | { |
374 | string errorMessage = String.Empty; | ||
375 | string url = m_serverUrl + id; | ||
376 | |||
374 | if (m_cache != null) | 377 | if (m_cache != null) |
375 | m_cache.Expire(id); | 378 | m_cache.Expire(id); |
376 | 379 | ||
377 | string url = m_serverUrl + id; | 380 | try |
381 | { | ||
382 | HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); | ||
383 | request.Method = "DELETE"; | ||
378 | 384 | ||
379 | OSDMap response = WebUtil.ServiceRequest(url, "DELETE"); | 385 | using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) |
380 | if (response["Success"].AsBoolean()) | 386 | { |
381 | return true; | 387 | if (response.StatusCode != HttpStatusCode.NoContent) |
382 | else | 388 | { |
383 | m_log.Warn("[SIMIAN ASSET CONNECTOR]: Failed to delete asset " + id + " from the asset service"); | 389 | m_log.Warn("[SIMIAN ASSET CONNECTOR]: Unexpected response when deleting asset " + url + ": " + |
390 | response.StatusCode + " (" + response.StatusDescription + ")"); | ||
391 | } | ||
392 | } | ||
384 | 393 | ||
385 | return false; | 394 | return true; |
395 | } | ||
396 | catch (Exception ex) | ||
397 | { | ||
398 | m_log.Warn("[SIMIAN ASSET CONNECTOR]: Failed to delete asset " + id + " from the asset service: " + ex.Message); | ||
399 | return false; | ||
400 | } | ||
386 | } | 401 | } |
387 | 402 | ||
388 | #endregion IAssetService | 403 | #endregion IAssetService |