diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 40e313ad94..2dfea2ac0d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs @@ -313,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes { foreach (Scene mscene in m_localScenes) { - if((mscene.RegionInfo.InternalEndPoint.Address.Equals(ipEndPoint.Address.Address)) && + if((mscene.RegionInfo.InternalEndPoint.Equals(ipEndPoint.Address)) && (mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port)) { scene = mscene; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 8651d7e0c3..ac35e46bf9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - catch (XmlException e) + catch (XmlException) { m_log.ErrorFormat("[SCENE OBJECT GROUP]: Deserialization of following xml failed, {0}", xmlData); diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs index d932c555b9..8cfc07d2f4 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs @@ -18,10 +18,11 @@ namespace OpenSim.Region.Modules.SvnSerialiser public class SvnBackupModule : IRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private readonly List m_scenes = new List(); + private readonly Timer m_timer = new Timer(); private bool m_enabled = false; private bool m_installBackupOnLoad = false; - private List m_scenes = new List(); private IRegionSerialiser m_serialiser; private bool m_svnAutoSave = false; private SvnClient m_svnClient; @@ -31,7 +32,6 @@ namespace OpenSim.Region.Modules.SvnSerialiser private TimeSpan m_svnperiod = new TimeSpan(0, 0, 15, 0, 0); private string m_svnurl = "svn://insert.your.svn/here/"; private string m_svnuser = "username"; - private Timer m_timer = new Timer(); #region SvnModule Core @@ -69,11 +69,11 @@ namespace OpenSim.Region.Modules.SvnSerialiser { m_log.Info("[SVNBACKUP]: Saving a region to SVN with name " + scene.RegionInfo.RegionName); - List filenames = m_serialiser.SerialiseRegion(scene, m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + "\\"); + List filenames = m_serialiser.SerialiseRegion(scene, m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + "\\"); try { - m_svnClient.Add3(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString(), true, false, false); + m_svnClient.Add3(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID, true, false, false); } catch (SvnException) { @@ -81,17 +81,17 @@ namespace OpenSim.Region.Modules.SvnSerialiser List svnfilenames = new List(); foreach (string filename in filenames) - svnfilenames.Add(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + Slash.DirectorySeparatorChar + filename); - svnfilenames.Add(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString()); + svnfilenames.Add(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + Slash.DirectorySeparatorChar + filename); + svnfilenames.Add(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID); return svnfilenames; } public void LoadRegion(Scene scene) { - scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + + scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + Slash.DirectorySeparatorChar + "objects.xml"); - scene.RequestModuleInterface().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + + scene.RequestModuleInterface().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + Slash.DirectorySeparatorChar + "heightmap.r32"); m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ")."); } @@ -146,7 +146,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser } } - string msg = "Region Backup (" + System.Environment.MachineName + " at " + DateTime.UtcNow.ToString() + " UTC)"; + string msg = "Region Backup (" + System.Environment.MachineName + " at " + DateTime.UtcNow + " UTC)"; m_log.Debug("[SVNBACKUP]: Saved with message: " + msg); @@ -194,10 +194,10 @@ namespace OpenSim.Region.Modules.SvnSerialiser if (m_enabled == false) return; - if (m_svnAutoSave == true) + if (m_svnAutoSave) { m_timer.Interval = m_svnperiod.TotalMilliseconds; - m_timer.Elapsed += new ElapsedEventHandler(m_timer_Elapsed); + m_timer.Elapsed += m_timer_Elapsed; m_timer.AutoReset = true; m_timer.Start(); }