* Converted a number of methods within the login processes from private to protected.
* Made several methods virtual to allow derivative overrides. * Minor cleanups.0.6.0-stable
parent
1d5e870ee2
commit
3476dd56ea
|
@ -307,7 +307,7 @@ namespace OpenSim.Framework.Communications
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public XmlRpcResponse ToXmlRpcResponse()
|
public virtual XmlRpcResponse ToXmlRpcResponse()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,7 +103,7 @@ namespace OpenSim.Framework.Communications
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">The XMLRPC request</param>
|
/// <param name="request">The XMLRPC request</param>
|
||||||
/// <returns>The response to send</returns>
|
/// <returns>The response to send</returns>
|
||||||
public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
|
public virtual XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
|
||||||
{
|
{
|
||||||
// Temporary fix
|
// Temporary fix
|
||||||
m_loginMutex.WaitOne();
|
m_loginMutex.WaitOne();
|
||||||
|
@ -123,8 +123,8 @@ namespace OpenSim.Framework.Communications
|
||||||
UserProfileData userProfile;
|
UserProfileData userProfile;
|
||||||
LoginResponse logResponse = new LoginResponse();
|
LoginResponse logResponse = new LoginResponse();
|
||||||
|
|
||||||
string firstname = String.Empty;
|
string firstname;
|
||||||
string lastname = String.Empty;
|
string lastname;
|
||||||
|
|
||||||
if (GoodXML)
|
if (GoodXML)
|
||||||
{
|
{
|
||||||
|
@ -230,7 +230,7 @@ namespace OpenSim.Framework.Communications
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
UUID agentID = userProfile.ID;
|
UUID agentID = userProfile.ID;
|
||||||
InventoryData inventData = null;
|
InventoryData inventData;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -265,7 +265,7 @@ namespace OpenSim.Framework.Communications
|
||||||
logResponse.InventorySkeleton = AgentInventoryArray;
|
logResponse.InventorySkeleton = AgentInventoryArray;
|
||||||
logResponse.InventoryLibrary = GetInventoryLibrary();
|
logResponse.InventoryLibrary = GetInventoryLibrary();
|
||||||
|
|
||||||
logResponse.CircuitCode = (Int32)Util.RandomClass.Next();
|
logResponse.CircuitCode = Util.RandomClass.Next();
|
||||||
logResponse.Lastname = userProfile.SurName;
|
logResponse.Lastname = userProfile.SurName;
|
||||||
logResponse.Firstname = userProfile.FirstName;
|
logResponse.Firstname = userProfile.FirstName;
|
||||||
logResponse.AgentID = agentID.ToString();
|
logResponse.AgentID = agentID.ToString();
|
||||||
|
@ -298,7 +298,7 @@ namespace OpenSim.Framework.Communications
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Info("[LOGIN END]: XMLRPC Login failed, " + e.ToString());
|
m_log.Info("[LOGIN END]: XMLRPC Login failed, " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,17 +104,11 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
lock (m_rpcHandlers)
|
lock (m_rpcHandlers)
|
||||||
{
|
{
|
||||||
if (!m_rpcHandlers.ContainsKey(method))
|
m_rpcHandlers[method] = handler;
|
||||||
{
|
|
||||||
m_rpcHandlers.Add(method, handler);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//must already have a handler for that path so return false
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool AddHTTPHandler(string method, GenericHTTPMethod handler)
|
public bool AddHTTPHandler(string method, GenericHTTPMethod handler)
|
||||||
{
|
{
|
||||||
lock (m_HTTPHandlers)
|
lock (m_HTTPHandlers)
|
||||||
|
|
|
@ -31,7 +31,6 @@ using OpenMetaverse;
|
||||||
using OpenMetaverse.Packets;
|
using OpenMetaverse.Packets;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
using OpenSim.Region.ClientStack.LindenUDP;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
|
@ -40,8 +39,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//private static readonly log4net.ILog m_log
|
//private static readonly log4net.ILog m_log
|
||||||
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private readonly LLClientStackNetworkHandler m_networkHandler;
|
protected readonly LLClientStackNetworkHandler m_networkHandler;
|
||||||
private IScene m_scene;
|
protected IScene m_scene;
|
||||||
|
|
||||||
//private readonly ClientManager m_clientManager = new ClientManager();
|
//private readonly ClientManager m_clientManager = new ClientManager();
|
||||||
//public ClientManager ClientManager
|
//public ClientManager ClientManager
|
||||||
|
|
|
@ -41,18 +41,18 @@ namespace OpenSim.Region.Communications.Local
|
||||||
|
|
||||||
public class LocalLoginService : LoginService
|
public class LocalLoginService : LoginService
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private CommunicationsLocal m_Parent;
|
protected CommunicationsLocal m_Parent;
|
||||||
|
|
||||||
private NetworkServersInfo serversInfo;
|
protected NetworkServersInfo serversInfo;
|
||||||
private uint defaultHomeX;
|
protected uint defaultHomeX;
|
||||||
private uint defaultHomeY;
|
protected uint defaultHomeY;
|
||||||
private bool authUsers = false;
|
protected bool authUsers = false;
|
||||||
|
|
||||||
public event LoginToRegionEvent OnLoginToRegion;
|
public event LoginToRegionEvent OnLoginToRegion;
|
||||||
|
|
||||||
private LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion;
|
protected LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion;
|
||||||
|
|
||||||
public LocalLoginService(UserManagerBase userManager, string welcomeMess,
|
public LocalLoginService(UserManagerBase userManager, string welcomeMess,
|
||||||
CommunicationsLocal parent, NetworkServersInfo serversInfo,
|
CommunicationsLocal parent, NetworkServersInfo serversInfo,
|
||||||
|
@ -246,7 +246,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
/// <param name="user"></param>
|
/// <param name="user"></param>
|
||||||
/// <param name="response"></param>
|
/// <param name="response"></param>
|
||||||
/// <returns>true if the region was successfully contacted, false otherwise</returns>
|
/// <returns>true if the region was successfully contacted, false otherwise</returns>
|
||||||
private bool PrepareLoginToRegion(RegionInfo regionInfo, UserProfileData user, LoginResponse response)
|
protected bool PrepareLoginToRegion(RegionInfo regionInfo, UserProfileData user, LoginResponse response)
|
||||||
{
|
{
|
||||||
response.SimAddress = regionInfo.ExternalEndPoint.Address.ToString();
|
response.SimAddress = regionInfo.ExternalEndPoint.Address.ToString();
|
||||||
response.SimPort = (uint)regionInfo.ExternalEndPoint.Port;
|
response.SimPort = (uint)regionInfo.ExternalEndPoint.Port;
|
||||||
|
|
Loading…
Reference in New Issue