From 751e70af788bf27fa0401c25d899f73186c8eafa Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 21:37:36 -0800 Subject: NetworkServersInfo removed from CommsManager. --- .../CreateCommsManager/CreateCommsManagerPlugin.cs | 19 +----------------- .../Communications/CommunicationsManager.cs | 7 ------- OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs | 17 ++++++++-------- .../InterGrid/OpenGridProtocolModule.cs | 4 ++-- .../ServiceConnectorsOut/Grid/HGGridConnector.cs | 23 +++++++++++----------- .../Inventory/HGInventoryBroker.cs | 8 +++++--- .../Scenes/Tests/SceneObjectBasicTests.cs | 1 - .../Scenes/Tests/SceneObjectLinkingTests.cs | 1 - .../Avatar/XmlRpcGroups/GroupsModule.cs | 5 +++-- .../Tests/Common/Mock/TestCommunicationsManager.cs | 1 - OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | 1 - 11 files changed, 31 insertions(+), 56 deletions(-) diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs index 4683f53..66a8890 100644 --- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs +++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs @@ -36,9 +36,6 @@ using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Osp; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; -using OpenSim.Region.Communications.Hypergrid; -using OpenSim.Region.Communications.Local; -using OpenSim.Region.Communications.OGS1; namespace OpenSim.ApplicationPlugins.CreateCommsManager { @@ -155,18 +152,12 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager /// protected virtual void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) { - m_commsManager - = new CommunicationsLocal( - m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, - libraryRootFolder); CreateGridInfoService(); } protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder) { - m_commsManager - = new CommunicationsOGS1(m_openSim.NetServersInfo, libraryRootFolder); m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler()); m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim)); @@ -176,20 +167,12 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder) { - m_commsManager - = new HGCommunicationsStandalone( - m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, - libraryRootFolder, false); - + CreateGridInfoService(); } protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder) { - m_commsManager - = new HGCommunicationsGridMode( - m_openSim.NetServersInfo, - m_openSim.SceneManager, libraryRootFolder); m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler()); m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim)); diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index bc04009..7c4ae9a 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -44,12 +44,6 @@ namespace OpenSim.Framework.Communications public class CommunicationsManager { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - public NetworkServersInfo NetworkServersInfo - { - get { return m_networkServersInfo; } - } - protected NetworkServersInfo m_networkServersInfo; /// /// Constructor @@ -58,7 +52,6 @@ namespace OpenSim.Framework.Communications public CommunicationsManager(NetworkServersInfo serversInfo, LibraryRootFolder libraryRootFolder) { - m_networkServersInfo = serversInfo; } } diff --git a/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs b/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs index 0f2ba32..f9bc935 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs @@ -119,14 +119,15 @@ namespace OpenSim.Region.CoreModules.InterGrid Hashtable requestData = (Hashtable)req.Params[0]; - if ((!requestData.Contains("password") || (string)requestData["password"] != m_com.NetworkServersInfo.GridRecvKey)) - { - responseData["accepted"] = false; - responseData["success"] = false; - responseData["error"] = "Invalid Key"; - response.Value = responseData; - return response; - } + // REFACTORING PROBLEM. This authorization needs to be replaced with some other + //if ((!requestData.Contains("password") || (string)requestData["password"] != m_com.NetworkServersInfo.GridRecvKey)) + //{ + // responseData["accepted"] = false; + // responseData["success"] = false; + // responseData["error"] = "Invalid Key"; + // response.Value = responseData; + // return response; + //} string message = (string)requestData["message"]; string user = (string)requestData["user"]; diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index cf7bcef..8cf4619 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs @@ -528,9 +528,9 @@ namespace OpenSim.Region.CoreModules.InterGrid userProfile.PasswordHash = "$1$"; userProfile.PasswordSalt = ""; userProfile.SurName = agentData.lastname; - userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL; + //userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL; userProfile.UserFlags = 0; - userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL; + //userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL; userProfile.WantDoMask = 0; userProfile.WebLoginKey = UUID.Random(); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index f3ccbda..782eddf 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs @@ -155,12 +155,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid ((ISharedRegionModule)m_GridServiceConnector).AddRegion(scene); - // Yikes!! Remove this as soon as user services get refactored - LocalAssetServerURI = scene.CommsManager.NetworkServersInfo.AssetURL; - LocalInventoryServerURI = scene.CommsManager.NetworkServersInfo.InventoryURL; - LocalUserServerURI = scene.CommsManager.NetworkServersInfo.UserURL; - HGNetworkServersInfo.Init(LocalAssetServerURI, LocalInventoryServerURI, LocalUserServerURI); - } public void RemoveRegion(Scene scene) @@ -760,7 +754,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid protected bool IsComingHome(ForeignUserProfileData userData) { - return (userData.UserServerURI == LocalUserServerURI); + return false; + // REFACTORING PROBLEM + //return (userData.UserServerURI == LocalUserServerURI); } // REFACTORING PROBLEM @@ -787,13 +783,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid protected bool IsLocalUser(UserAccount account) { - if (account != null && - account.ServiceURLs.ContainsKey("HomeURI") && - account.ServiceURLs["HomeURI"] != null) + return true; - return (account.ServiceURLs["HomeURI"].ToString() == LocalUserServerURI); + // REFACTORING PROBLEM + //if (account != null && + // account.ServiceURLs.ContainsKey("HomeURI") && + // account.ServiceURLs["HomeURI"] != null) - return false; + // return (account.ServiceURLs["HomeURI"].ToString() == LocalUserServerURI); + + //return false; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 5ed2b7a..8fed4da 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -61,9 +61,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory { get { - if (m_LocalGridInventoryURI == null || m_LocalGridInventoryURI == "") - m_LocalGridInventoryURI = m_Scene.CommsManager.NetworkServersInfo.InventoryURL; - return m_LocalGridInventoryURI; + return string.Empty; + // REFACTORING PROBLEM + //if (m_LocalGridInventoryURI == null || m_LocalGridInventoryURI == "") + // m_LocalGridInventoryURI = m_Scene.CommsManager.NetworkServersInfo.InventoryURL; + //return m_LocalGridInventoryURI; } } diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 0ed00de..a58b4d0 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs @@ -33,7 +33,6 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; -using OpenSim.Region.Communications.Local; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; using OpenSim.Tests.Common.Mock; diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index 709cca2..14db741 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs @@ -33,7 +33,6 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; -using OpenSim.Region.Communications.Local; using OpenSim.Region.Framework.Scenes; using OpenSim.Tests.Common; using OpenSim.Tests.Common.Mock; diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index c8a10b5..68e6497 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -1159,12 +1159,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId); // Default to local user service and hope for the best? - info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; + // REFACTORING PROBLEM + //info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; } else { - string domain = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; + string domain = string.Empty; //m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; if (account.ServiceURLs["HomeURI"] != null) domain = account.ServiceURLs["HomeURI"].ToString(); // They're a local user, use this: diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs index d4cdcd6..8e193c1 100644 --- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs +++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs @@ -30,7 +30,6 @@ using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; -using OpenSim.Region.Communications.Local; using OpenSim.Data; namespace OpenSim.Tests.Common.Mock diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs index b54299b..24ad3eb 100644 --- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs @@ -28,7 +28,6 @@ using OpenMetaverse; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; -using OpenSim.Region.Communications.Local; namespace OpenSim.Tests.Common.Setup { -- cgit v1.1