diff options
author | Melanie | 2010-06-25 20:26:48 +0100 |
---|---|---|
committer | Melanie | 2010-06-25 20:26:48 +0100 |
commit | dc9e9931eb6e1614d2a2a5f8c28941b5d6280103 (patch) | |
tree | 57a9714e264575c2b6045db07952495b81adeb6e | |
parent | Make "Allow other residents to edit terrain" default to FALSE (diff) | |
parent | fix web request exception reporting properly this time (diff) | |
download | opensim-SC_OLD-dc9e9931eb6e1614d2a2a5f8c28941b5d6280103.zip opensim-SC_OLD-dc9e9931eb6e1614d2a2a5f8c28941b5d6280103.tar.gz opensim-SC_OLD-dc9e9931eb6e1614d2a2a5f8c28941b5d6280103.tar.bz2 opensim-SC_OLD-dc9e9931eb6e1614d2a2a5f8c28941b5d6280103.tar.xz |
Merge branch 'master' into careminster-presence-refactor
-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 80f9114..06bc5cd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -633,7 +633,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
633 | if (!Entities.Remove(agentID)) | 633 | if (!Entities.Remove(agentID)) |
634 | { | 634 | { |
635 | m_log.WarnFormat( | 635 | m_log.WarnFormat( |
636 | "[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", | 636 | "[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", |
637 | agentID); | 637 | agentID); |
638 | } | 638 | } |
639 | 639 | ||
@@ -642,12 +642,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
642 | { | 642 | { |
643 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); | 643 | Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); |
644 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); | 644 | List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); |
645 | 645 | ||
646 | // Remember the old presene reference from the dictionary | ||
647 | ScenePresence oldref = newmap[agentID]; | ||
648 | // Remove the presence reference from the dictionary | 646 | // Remove the presence reference from the dictionary |
649 | if (newmap.Remove(agentID)) | 647 | if (newmap.ContainsKey(agentID)) |
650 | { | 648 | { |
649 | ScenePresence oldref = newmap[agentID]; | ||
650 | newmap.Remove(agentID); | ||
651 | |||
651 | // Find the index in the list where the old ref was stored and remove the reference | 652 | // Find the index in the list where the old ref was stored and remove the reference |
652 | newlist.RemoveAt(newlist.IndexOf(oldref)); | 653 | newlist.RemoveAt(newlist.IndexOf(oldref)); |
653 | // Swap out the dictionary and list with new references | 654 | // Swap out the dictionary and list with new references |
@@ -656,7 +657,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
656 | } | 657 | } |
657 | else | 658 | else |
658 | { | 659 | { |
659 | m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); | 660 | m_log.WarnFormat("[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); |
660 | } | 661 | } |
661 | } | 662 | } |
662 | finally | 663 | 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 |