NetworkServersInfo removed from CommsManager.

slimupdates
Diva Canto 2010-01-10 21:37:36 -08:00
parent cddd48aeea
commit 751e70af78
11 changed files with 31 additions and 56 deletions

View File

@ -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
/// <param name="libraryRootFolder"></param>
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));

View File

@ -45,12 +45,6 @@ namespace OpenSim.Framework.Communications
{
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public NetworkServersInfo NetworkServersInfo
{
get { return m_networkServersInfo; }
}
protected NetworkServersInfo m_networkServersInfo;
/// <summary>
/// Constructor
/// </summary>
@ -58,7 +52,6 @@ namespace OpenSim.Framework.Communications
public CommunicationsManager(NetworkServersInfo serversInfo,
LibraryRootFolder libraryRootFolder)
{
m_networkServersInfo = serversInfo;
}
}

View File

@ -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"];

View File

@ -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();

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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:

View File

@ -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

View File

@ -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
{