* Only allow logins on standalone when the sim has completed it's initial startup (script startup doesn't count here)
* There was a small window where region logins were allowed before modules were loaded - avatars logins that hit this window could have caused bad things to happen. * A similar change will follow for grid mode sometime soon0.6.0-stable
parent
5d3fe9f8cd
commit
5fb7b485b2
|
@ -51,12 +51,20 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly Dictionary<UUID, CachedUserInfo> m_userProfiles = new Dictionary<UUID, CachedUserInfo>();
|
private readonly Dictionary<UUID, CachedUserInfo> m_userProfiles = new Dictionary<UUID, CachedUserInfo>();
|
||||||
|
|
||||||
public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder();
|
/// <summary>
|
||||||
|
/// The root library folder.
|
||||||
|
/// </summary>
|
||||||
|
public readonly LibraryRootFolder LibraryRoot;
|
||||||
|
|
||||||
// Methods
|
/// <summary>
|
||||||
public UserProfileCacheService(CommunicationsManager commsManager)
|
/// Constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="commsManager"></param>
|
||||||
|
/// <param name="libraryRootFolder"></param>
|
||||||
|
public UserProfileCacheService(CommunicationsManager commsManager, LibraryRootFolder libraryRootFolder)
|
||||||
{
|
{
|
||||||
m_commsManager = commsManager;
|
m_commsManager = commsManager;
|
||||||
|
LibraryRoot = libraryRootFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -293,10 +301,10 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
// FIXME MAYBE: We're not handling sortOrder!
|
// FIXME MAYBE: We're not handling sortOrder!
|
||||||
|
|
||||||
InventoryFolderImpl fold = null;
|
InventoryFolderImpl fold = null;
|
||||||
if ((fold = libraryRoot.FindFolder(folderID)) != null)
|
if ((fold = LibraryRoot.FindFolder(folderID)) != null)
|
||||||
{
|
{
|
||||||
remoteClient.SendInventoryFolderDetails(
|
remoteClient.SendInventoryFolderDetails(
|
||||||
libraryRoot.Owner, folderID, fold.RequestListOfItems(),
|
LibraryRoot.Owner, folderID, fold.RequestListOfItems(),
|
||||||
fold.RequestListOfFolders(), fetchFolders, fetchItems);
|
fold.RequestListOfFolders(), fetchFolders, fetchItems);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -337,7 +345,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
// FIXME MAYBE: We're not handling sortOrder!
|
// FIXME MAYBE: We're not handling sortOrder!
|
||||||
|
|
||||||
InventoryFolderImpl fold;
|
InventoryFolderImpl fold;
|
||||||
if ((fold = libraryRoot.FindFolder(folderID)) != null)
|
if ((fold = LibraryRoot.FindFolder(folderID)) != null)
|
||||||
{
|
{
|
||||||
return fold.RequestListOfItems();
|
return fold.RequestListOfItems();
|
||||||
}
|
}
|
||||||
|
@ -428,7 +436,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
|
|
||||||
public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID)
|
public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID)
|
||||||
{
|
{
|
||||||
if (ownerID == libraryRoot.Owner)
|
if (ownerID == LibraryRoot.Owner)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("request info for library item");
|
//Console.WriteLine("request info for library item");
|
||||||
|
|
||||||
|
|
|
@ -112,11 +112,11 @@ namespace OpenSim.Framework.Communications
|
||||||
/// <param name="assetCache"></param>
|
/// <param name="assetCache"></param>
|
||||||
/// <param name="dumpAssetsToFile"></param>
|
/// <param name="dumpAssetsToFile"></param>
|
||||||
public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache,
|
public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache,
|
||||||
bool dumpAssetsToFile)
|
bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder)
|
||||||
{
|
{
|
||||||
m_networkServersInfo = serversInfo;
|
m_networkServersInfo = serversInfo;
|
||||||
m_assetCache = assetCache;
|
m_assetCache = assetCache;
|
||||||
m_userProfileCacheService = new UserProfileCacheService(this);
|
m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder);
|
||||||
// m_transactionsManager = new AgentAssetTransactionsManager(this, dumpAssetsToFile);
|
// m_transactionsManager = new AgentAssetTransactionsManager(this, dumpAssetsToFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ namespace OpenSim.Framework.Communications
|
||||||
|
|
||||||
public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client)
|
public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
if (uuid == m_userProfileCacheService.libraryRoot.Owner)
|
if (uuid == m_userProfileCacheService.LibraryRoot.Owner)
|
||||||
{
|
{
|
||||||
remote_client.SendNameReply(uuid, "Mr", "OpenSim");
|
remote_client.SendNameReply(uuid, "Mr", "OpenSim");
|
||||||
}
|
}
|
||||||
|
@ -376,7 +376,6 @@ namespace OpenSim.Framework.Communications
|
||||||
string[] returnstring = new string[0];
|
string[] returnstring = new string[0];
|
||||||
bool doLookup = false;
|
bool doLookup = false;
|
||||||
|
|
||||||
|
|
||||||
lock (m_nameRequestCache)
|
lock (m_nameRequestCache)
|
||||||
{
|
{
|
||||||
if (m_nameRequestCache.ContainsKey(uuid))
|
if (m_nameRequestCache.ContainsKey(uuid))
|
||||||
|
@ -405,8 +404,8 @@ namespace OpenSim.Framework.Communications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return returnstring;
|
|
||||||
|
|
||||||
|
return returnstring;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UUIDNameCachedTest(UUID uuid)
|
public bool UUIDNameCachedTest(UUID uuid)
|
||||||
|
|
|
@ -34,6 +34,11 @@ namespace OpenSim.Framework.Communications
|
||||||
{
|
{
|
||||||
string gdebugRegionName { get; set; }
|
string gdebugRegionName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If true, then regions will accept logins from the user service. If false, then they will not.
|
||||||
|
/// </summary>
|
||||||
|
bool RegionLoginsEnabled { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register a region with the grid service.
|
/// Register a region with the grid service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -239,8 +239,8 @@ namespace OpenSim.Framework.Communications
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[LOGIN END]: XMLRPC Error retrieving inventory skeleton of agent {0}, {1} - {2}",
|
"[LOGIN END]: Error retrieving inventory skeleton of agent {0} - {1}",
|
||||||
agentID, e.GetType(), e.Message);
|
agentID, e);
|
||||||
|
|
||||||
return logResponse.CreateLoginInventoryFailedResponse();
|
return logResponse.CreateLoginInventoryFailedResponse();
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,6 @@ namespace OpenSim
|
||||||
public bool m_gridLocalAsset;
|
public bool m_gridLocalAsset;
|
||||||
public bool m_see_into_region_from_neighbor;
|
public bool m_see_into_region_from_neighbor;
|
||||||
|
|
||||||
protected LocalLoginService m_loginService;
|
|
||||||
protected GridInfoService m_gridInfoService;
|
protected GridInfoService m_gridInfoService;
|
||||||
|
|
||||||
protected string m_storageDll;
|
protected string m_storageDll;
|
||||||
|
@ -369,6 +368,8 @@ namespace OpenSim
|
||||||
|
|
||||||
m_stats = StatsManager.StartCollectingSimExtraStats();
|
m_stats = StatsManager.StartCollectingSimExtraStats();
|
||||||
|
|
||||||
|
LibraryRootFolder libraryRootFolder = new LibraryRootFolder();
|
||||||
|
|
||||||
// StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false)
|
// StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false)
|
||||||
if (m_sandbox)
|
if (m_sandbox)
|
||||||
{
|
{
|
||||||
|
@ -382,24 +383,24 @@ namespace OpenSim
|
||||||
|
|
||||||
LocalBackEndServices backendService = new LocalBackEndServices();
|
LocalBackEndServices backendService = new LocalBackEndServices();
|
||||||
|
|
||||||
CommunicationsLocal localComms =
|
LocalLoginService loginService =
|
||||||
new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, userService,
|
new LocalLoginService(
|
||||||
inventoryService, backendService, backendService, m_dumpAssetsToFile);
|
userService, m_standaloneWelcomeMessage, inventoryService, backendService, m_networkServersInfo,
|
||||||
m_commsManager = localComms;
|
m_standaloneAuthenticate, libraryRootFolder);
|
||||||
|
|
||||||
m_loginService =
|
m_commsManager
|
||||||
new LocalLoginService(userService, m_standaloneWelcomeMessage, localComms, m_networkServersInfo,
|
= new CommunicationsLocal(
|
||||||
m_standaloneAuthenticate);
|
m_networkServersInfo, m_httpServer, m_assetCache, userService, userService,
|
||||||
m_loginService.OnLoginToRegion += backendService.AddNewSession;
|
inventoryService, backendService, backendService, libraryRootFolder, m_dumpAssetsToFile);
|
||||||
|
|
||||||
// set up XMLRPC handler for client's initial login request message
|
// set up XMLRPC handler for client's initial login request message
|
||||||
m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
|
m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod);
|
||||||
|
|
||||||
// provides the web form login
|
// provides the web form login
|
||||||
m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);
|
m_httpServer.AddHTTPHandler("login", loginService.ProcessHTMLLogin);
|
||||||
|
|
||||||
// Provides the LLSD login
|
// Provides the LLSD login
|
||||||
m_httpServer.SetDefaultLLSDHandler(m_loginService.LLSDLoginMethod);
|
m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod);
|
||||||
|
|
||||||
// provide grid info
|
// provide grid info
|
||||||
// m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini")));
|
// m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini")));
|
||||||
|
@ -410,7 +411,9 @@ namespace OpenSim
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// We are in grid mode
|
// We are in grid mode
|
||||||
m_commsManager = new CommunicationsOGS1(m_networkServersInfo, m_httpServer, m_assetCache);
|
m_commsManager
|
||||||
|
= new CommunicationsOGS1(m_networkServersInfo, m_httpServer, m_assetCache, libraryRootFolder);
|
||||||
|
|
||||||
m_httpServer.AddStreamHandler(new SimStatusHandler());
|
m_httpServer.AddStreamHandler(new SimStatusHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,6 +424,9 @@ namespace OpenSim
|
||||||
m_moduleLoader = new ModuleLoader(m_config.Source);
|
m_moduleLoader = new ModuleLoader(m_config.Source);
|
||||||
|
|
||||||
LoadPlugins();
|
LoadPlugins();
|
||||||
|
|
||||||
|
// Only enable logins to the regions once we have completely finished starting up
|
||||||
|
m_commsManager.GridService.RegionLoginsEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
|
|
|
@ -4884,7 +4884,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
|
InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID);
|
||||||
if (assetRequestItem == null)
|
if (assetRequestItem == null)
|
||||||
{
|
{
|
||||||
assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID);
|
assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);
|
||||||
if (assetRequestItem == null)
|
if (assetRequestItem == null)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,9 +87,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
m_log.Error("[HTTP]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
|
m_log.Error("[HTTP]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_log.Info("[REGION]: Starting HTTP server");
|
m_log.Info("[REGION]: Starting HTTP server");
|
||||||
|
|
||||||
m_httpServer.Start();
|
m_httpServer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@ namespace OpenSim.Region.Communications.Local
|
||||||
IUserServiceAdmin userServiceAdmin,
|
IUserServiceAdmin userServiceAdmin,
|
||||||
LocalInventoryService inventoryService,
|
LocalInventoryService inventoryService,
|
||||||
IInterRegionCommunications interRegionService,
|
IInterRegionCommunications interRegionService,
|
||||||
IGridServices gridService, bool dumpAssetsToFile)
|
IGridServices gridService, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile)
|
||||||
: base(serversInfo, httpServer, assetCache, dumpAssetsToFile)
|
: base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder)
|
||||||
{
|
{
|
||||||
AddInventoryService(inventoryService);
|
AddInventoryService(inventoryService);
|
||||||
m_defaultInventoryHost = inventoryService.Host;
|
m_defaultInventoryHost = inventoryService.Host;
|
||||||
|
|
|
@ -51,6 +51,13 @@ namespace OpenSim.Region.Communications.Local
|
||||||
|
|
||||||
public string _gdebugRegionName = String.Empty;
|
public string _gdebugRegionName = String.Empty;
|
||||||
|
|
||||||
|
public bool RegionLoginsEnabled
|
||||||
|
{
|
||||||
|
get { return m_regionLoginsEnabled; }
|
||||||
|
set { m_regionLoginsEnabled = value; }
|
||||||
|
}
|
||||||
|
private bool m_regionLoginsEnabled;
|
||||||
|
|
||||||
public bool CheckRegion(string address, uint port)
|
public bool CheckRegion(string address, uint port)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -70,10 +77,6 @@ namespace OpenSim.Region.Communications.Local
|
||||||
set { _rdebugRegionName = value; }
|
set { _rdebugRegionName = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalBackEndServices()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register a region method with the BackEnd Services.
|
/// Register a region method with the BackEnd Services.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -34,6 +34,7 @@ using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
|
||||||
namespace OpenSim.Region.Communications.Local
|
namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
|
@ -43,27 +44,41 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected CommunicationsLocal m_Parent;
|
|
||||||
|
|
||||||
protected NetworkServersInfo serversInfo;
|
protected NetworkServersInfo serversInfo;
|
||||||
protected uint defaultHomeX;
|
protected uint defaultHomeX;
|
||||||
protected uint defaultHomeY;
|
protected uint defaultHomeY;
|
||||||
protected bool authUsers = false;
|
protected bool authUsers = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used by the login service to make requests to the inventory service.
|
||||||
|
/// </summary>
|
||||||
|
protected IInterServiceInventoryServices m_interServiceInventoryService;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Used to make requests to the local regions.
|
||||||
|
/// </summary>
|
||||||
|
protected IGridServices m_gridService;
|
||||||
|
|
||||||
public event LoginToRegionEvent OnLoginToRegion;
|
public event LoginToRegionEvent OnLoginToRegion;
|
||||||
|
|
||||||
protected LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion;
|
protected LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion;
|
||||||
|
|
||||||
public LocalLoginService(UserManagerBase userManager, string welcomeMess,
|
public LocalLoginService(
|
||||||
CommunicationsLocal parent, NetworkServersInfo serversInfo,
|
UserManagerBase userManager, string welcomeMess,
|
||||||
bool authenticate)
|
IInterServiceInventoryServices interServiceInventoryService, LocalBackEndServices gridService,
|
||||||
: base(userManager, parent.UserProfileCacheService.libraryRoot, welcomeMess)
|
NetworkServersInfo serversInfo,
|
||||||
|
bool authenticate, LibraryRootFolder libraryRootFolder)
|
||||||
|
: base(userManager, libraryRootFolder, welcomeMess)
|
||||||
{
|
{
|
||||||
m_Parent = parent;
|
|
||||||
this.serversInfo = serversInfo;
|
this.serversInfo = serversInfo;
|
||||||
defaultHomeX = this.serversInfo.DefaultHomeLocX;
|
defaultHomeX = this.serversInfo.DefaultHomeLocX;
|
||||||
defaultHomeY = this.serversInfo.DefaultHomeLocY;
|
defaultHomeY = this.serversInfo.DefaultHomeLocY;
|
||||||
authUsers = authenticate;
|
authUsers = authenticate;
|
||||||
|
|
||||||
|
m_interServiceInventoryService = interServiceInventoryService;
|
||||||
|
m_gridService = gridService;
|
||||||
|
|
||||||
|
OnLoginToRegion += gridService.AddNewSession;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override UserProfileData GetTheUser(string firstname, string lastname)
|
public override UserProfileData GetTheUser(string firstname, string lastname)
|
||||||
|
@ -84,7 +99,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
profile = m_userManager.GetUserProfile(firstname, lastname);
|
profile = m_userManager.GetUserProfile(firstname, lastname);
|
||||||
if (profile != null)
|
if (profile != null)
|
||||||
{
|
{
|
||||||
m_Parent.InterServiceInventoryService.CreateNewUserInventory(profile.ID);
|
m_interServiceInventoryService.CreateNewUserInventory(profile.ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
|
@ -129,11 +144,12 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
// HomeLocation
|
// HomeLocation
|
||||||
RegionInfo homeInfo = null;
|
RegionInfo homeInfo = null;
|
||||||
|
|
||||||
// use the homeRegionID if it is stored already. If not, use the regionHandle as before
|
// use the homeRegionID if it is stored already. If not, use the regionHandle as before
|
||||||
if (theUser.HomeRegionID != UUID.Zero)
|
if (theUser.HomeRegionID != UUID.Zero)
|
||||||
homeInfo = m_Parent.GridService.RequestNeighbourInfo(theUser.HomeRegionID);
|
homeInfo = m_gridService.RequestNeighbourInfo(theUser.HomeRegionID);
|
||||||
else
|
else
|
||||||
homeInfo = m_Parent.GridService.RequestNeighbourInfo(theUser.HomeRegion);
|
homeInfo = m_gridService.RequestNeighbourInfo(theUser.HomeRegion);
|
||||||
if (homeInfo != null)
|
if (homeInfo != null)
|
||||||
{
|
{
|
||||||
response.Home =
|
response.Home =
|
||||||
|
@ -172,7 +188,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
else if (startLocationRequest == "last")
|
else if (startLocationRequest == "last")
|
||||||
{
|
{
|
||||||
regionInfo = m_Parent.GridService.RequestNeighbourInfo(theUser.CurrentAgent.Region);
|
regionInfo = m_gridService.RequestNeighbourInfo(theUser.CurrentAgent.Region);
|
||||||
response.LookAt = "[r" + theUser.CurrentAgent.LookAt.X.ToString() + ",r" + theUser.CurrentAgent.LookAt.Y.ToString() + ",r" + theUser.CurrentAgent.LookAt.Z.ToString() + "]";
|
response.LookAt = "[r" + theUser.CurrentAgent.LookAt.X.ToString() + ",r" + theUser.CurrentAgent.LookAt.Y.ToString() + ",r" + theUser.CurrentAgent.LookAt.Z.ToString() + "]";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -186,7 +202,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string region = uriMatch.Groups["region"].ToString();
|
string region = uriMatch.Groups["region"].ToString();
|
||||||
regionInfo = m_Parent.GridService.RequestClosestRegion(region);
|
regionInfo = m_gridService.RequestClosestRegion(region);
|
||||||
if (regionInfo == null)
|
if (regionInfo == null)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[LOGIN]: Got Custom Login URL {0}, can't locate region {1}", startLocationRequest, region);
|
m_log.InfoFormat("[LOGIN]: Got Custom Login URL {0}, can't locate region {1}", startLocationRequest, region);
|
||||||
|
@ -208,7 +224,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartLocation not available, send him to a nearby region instead
|
// StartLocation not available, send him to a nearby region instead
|
||||||
// regionInfo = m_Parent.GridService.RequestClosestRegion("");
|
// regionInfo = m_gridService.RequestClosestRegion("");
|
||||||
//m_log.InfoFormat("[LOGIN]: StartLocation not available sending to region {0}", regionInfo.regionName);
|
//m_log.InfoFormat("[LOGIN]: StartLocation not available sending to region {0}", regionInfo.regionName);
|
||||||
|
|
||||||
// Send him to default region instead
|
// Send him to default region instead
|
||||||
|
@ -222,7 +238,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead");
|
m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead");
|
||||||
regionInfo = m_Parent.GridService.RequestNeighbourInfo(defaultHandle);
|
regionInfo = m_gridService.RequestNeighbourInfo(defaultHandle);
|
||||||
|
|
||||||
// Customise the response
|
// Customise the response
|
||||||
//response.Home =
|
//response.Home =
|
||||||
|
@ -274,24 +290,26 @@ namespace OpenSim.Region.Communications.Local
|
||||||
loginParams.StartPos = user.CurrentAgent.Position;
|
loginParams.StartPos = user.CurrentAgent.Position;
|
||||||
loginParams.CapsPath = capsPath;
|
loginParams.CapsPath = capsPath;
|
||||||
|
|
||||||
|
if (m_gridService.RegionLoginsEnabled)
|
||||||
|
{
|
||||||
handlerLoginToRegion = OnLoginToRegion;
|
handlerLoginToRegion = OnLoginToRegion;
|
||||||
if (handlerLoginToRegion == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
handlerLoginToRegion(user.CurrentAgent.Handle, loginParams);
|
handlerLoginToRegion(user.CurrentAgent.Handle, loginParams);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// See LoginService
|
// See LoginService
|
||||||
protected override InventoryData GetInventorySkeleton(UUID userID)
|
protected override InventoryData GetInventorySkeleton(UUID userID)
|
||||||
{
|
{
|
||||||
List<InventoryFolderBase> folders = m_Parent.InterServiceInventoryService.GetInventorySkeleton(userID);
|
List<InventoryFolderBase> folders = m_interServiceInventoryService.GetInventorySkeleton(userID);
|
||||||
|
|
||||||
// If we have user auth but no inventory folders for some reason, create a new set of folders.
|
// If we have user auth but no inventory folders for some reason, create a new set of folders.
|
||||||
if (null == folders || 0 == folders.Count)
|
if (null == folders || 0 == folders.Count)
|
||||||
{
|
{
|
||||||
m_Parent.InterServiceInventoryService.CreateNewUserInventory(userID);
|
m_interServiceInventoryService.CreateNewUserInventory(userID);
|
||||||
folders = m_Parent.InterServiceInventoryService.GetInventorySkeleton(userID);
|
folders = m_interServiceInventoryService.GetInventorySkeleton(userID);
|
||||||
}
|
}
|
||||||
|
|
||||||
UUID rootID = UUID.Zero;
|
UUID rootID = UUID.Zero;
|
||||||
|
|
|
@ -34,8 +34,10 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
public class CommunicationsOGS1 : CommunicationsManager
|
public class CommunicationsOGS1 : CommunicationsManager
|
||||||
{
|
{
|
||||||
public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache)
|
public CommunicationsOGS1(
|
||||||
: base(serversInfo, httpServer, assetCache, false)
|
NetworkServersInfo serversInfo, BaseHttpServer httpServer,
|
||||||
|
AssetCache assetCache, LibraryRootFolder libraryRootFolder)
|
||||||
|
: base(serversInfo, httpServer, assetCache, false, libraryRootFolder)
|
||||||
{
|
{
|
||||||
OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);
|
OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);
|
||||||
m_gridService = gridInterComms;
|
m_gridService = gridInterComms;
|
||||||
|
|
|
@ -51,15 +51,16 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
// FIXME: LocalBackEndServices should to be refactored into a separate common parent class rather than
|
||||||
|
// encapsulated.
|
||||||
private LocalBackEndServices m_localBackend = new LocalBackEndServices();
|
private LocalBackEndServices m_localBackend = new LocalBackEndServices();
|
||||||
|
|
||||||
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>();
|
||||||
// private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>();
|
// private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>();
|
||||||
private Dictionary<ulong, int> m_deadRegionCache = new Dictionary<ulong, int>();
|
private Dictionary<ulong, int> m_deadRegionCache = new Dictionary<ulong, int>();
|
||||||
private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>();
|
private Dictionary<string, string> m_queuedGridSettings = new Dictionary<string, string>();
|
||||||
private List<RegionInfo> m_regionsOnInstance = new List<RegionInfo>();
|
private List<RegionInfo> m_regionsOnInstance = new List<RegionInfo>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public BaseHttpServer httpListener;
|
public BaseHttpServer httpListener;
|
||||||
public NetworkServersInfo serversInfo;
|
public NetworkServersInfo serversInfo;
|
||||||
public BaseHttpServer httpServer;
|
public BaseHttpServer httpServer;
|
||||||
|
@ -80,6 +81,16 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
set { _rdebugRegionName = value; }
|
set { _rdebugRegionName = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Doesn't have any effect yet!
|
||||||
|
/// </summary>
|
||||||
|
public bool RegionLoginsEnabled
|
||||||
|
{
|
||||||
|
get { return m_regionLoginsEnabled; }
|
||||||
|
set { m_regionLoginsEnabled = value; }
|
||||||
|
}
|
||||||
|
private bool m_regionLoginsEnabled;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contructor. Adds "expect_user" and "check" xmlrpc method handlers
|
/// Contructor. Adds "expect_user" and "check" xmlrpc method handlers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -500,7 +500,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
"[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}",
|
"[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}",
|
||||||
remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName);
|
remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName);
|
||||||
|
|
||||||
InventoryItemBase item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(oldItemID);
|
InventoryItemBase item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(oldItemID);
|
||||||
|
|
||||||
if (item == null)
|
if (item == null)
|
||||||
{
|
{
|
||||||
|
@ -1207,7 +1207,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// XXX clumsy, possibly should be one call
|
// XXX clumsy, possibly should be one call
|
||||||
if (null == item)
|
if (null == item)
|
||||||
{
|
{
|
||||||
item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID);
|
item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
@ -1272,7 +1272,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// XXX clumsy, possibly should be one call
|
// XXX clumsy, possibly should be one call
|
||||||
if (null == item)
|
if (null == item)
|
||||||
{
|
{
|
||||||
item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID);
|
item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
|
Loading…
Reference in New Issue