From b140988a1fdb182473b490a6671fd0853f335838 Mon Sep 17 00:00:00 2001 From: diva Date: Sat, 21 Mar 2009 19:37:35 +0000 Subject: [PATCH] Minor changes in names inside. --- .../Framework/Services/RegionAssetService.cs | 76 +------------------ .../Framework/Services/RegionMapService.cs | 8 +- 2 files changed, 6 insertions(+), 78 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/Services/RegionAssetService.cs b/OpenSim/Region/CoreModules/Framework/Services/RegionAssetService.cs index 629c9c03a1..ff506bff74 100644 --- a/OpenSim/Region/CoreModules/Framework/Services/RegionAssetService.cs +++ b/OpenSim/Region/CoreModules/Framework/Services/RegionAssetService.cs @@ -48,7 +48,6 @@ namespace OpenSim.Region.CoreModules.Framework.Services private static bool enabled = false; Scene m_scene; - //AssetService m_assetService; #region IRegionModule interface @@ -68,9 +67,8 @@ namespace OpenSim.Region.CoreModules.Framework.Services { if (enabled) { - m_log.Info("[HGStandaloneAssetService]: Starting..."); + m_log.Info("[RegionAssetService]: Starting..."); - //m_assetService = new AssetService(m_scene); new AssetService(m_scene); } } @@ -81,7 +79,7 @@ namespace OpenSim.Region.CoreModules.Framework.Services public string Name { - get { return "HGStandaloneAssetService"; } + get { return "RegionAssetService"; } } public bool IsSharedModule @@ -122,75 +120,5 @@ namespace OpenSim.Region.CoreModules.Framework.Services httpServer.AddStreamHandler(new PostAssetStreamHandler(m_assetProvider)); } - - ///// - ///// Check that the source of an inventory request is one that we trust. - ///// - ///// - ///// - //public bool CheckTrustSource(IPEndPoint peer) - //{ - // if (m_doLookup) - // { - // m_log.InfoFormat("[GRID AGENT INVENTORY]: Checking trusted source {0}", peer); - // UriBuilder ub = new UriBuilder(m_userserver_url); - // IPAddress[] uaddrs = Dns.GetHostAddresses(ub.Host); - // foreach (IPAddress uaddr in uaddrs) - // { - // if (uaddr.Equals(peer.Address)) - // { - // return true; - // } - // } - - // m_log.WarnFormat( - // "[GRID AGENT INVENTORY]: Rejecting request since source {0} was not in the list of trusted sources", - // peer); - - // return false; - // } - // else - // { - // return true; - // } - //} - - /// - /// Check that the source of an inventory request for a particular agent is a current session belonging to - /// that agent. - /// - /// - /// - /// - public bool CheckAuthSession(string session_id, string avatar_id) - { - if (m_doLookup) - { - m_log.InfoFormat("[HGStandaloneInvService]: checking authed session {0} {1}", session_id, avatar_id); - UUID userID = UUID.Zero; - UUID sessionID = UUID.Zero; - UUID.TryParse(avatar_id, out userID); - UUID.TryParse(session_id, out sessionID); - if (userID.Equals(UUID.Zero) || sessionID.Equals(UUID.Zero)) - { - m_log.Info("[HGStandaloneInvService]: Invalid user or session id " + avatar_id + "; " + session_id); - return false; - } - UserProfileData userProfile = m_userService.GetUserProfile(userID); - if (userProfile != null && userProfile.CurrentAgent != null && - userProfile.CurrentAgent.SessionID == sessionID) - { - m_log.Info("[HGStandaloneInvService]: user is logged in and session is valid. Authorizing access."); - return true; - } - - m_log.Warn("[HGStandaloneInvService]: unknown user or session_id, request rejected"); - return false; - } - else - { - return true; - } - } } } diff --git a/OpenSim/Region/CoreModules/Framework/Services/RegionMapService.cs b/OpenSim/Region/CoreModules/Framework/Services/RegionMapService.cs index cc87459710..8189b72110 100644 --- a/OpenSim/Region/CoreModules/Framework/Services/RegionMapService.cs +++ b/OpenSim/Region/CoreModules/Framework/Services/RegionMapService.cs @@ -64,8 +64,8 @@ namespace OpenSim.Region.CoreModules.Framework.Services initialized = true; m_scene = scene; - // This module is only on for standalones in hypergrid mode - enabled = !config.Configs["Startup"].GetBoolean("gridmode", true) && config.Configs["Startup"].GetBoolean("hypergrid", false); + // This module is only on for hypergrid mode + enabled = config.Configs["Startup"].GetBoolean("hypergrid", false); } } @@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.Framework.Services { if (enabled) { - m_log.Info("[HGStandaloneGridService]: Starting..."); + m_log.Info("[RegionMapService]: Starting..."); //m_assetService = new AssetService(m_scene); new GridService(m_scene); @@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Framework.Services public string Name { - get { return "HGStandaloneGridService"; } + get { return "RegionMapService"; } } public bool IsSharedModule