mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
* Renamed stuff on UserManagerBase to get implicit implementation of IUserServices (instead of stubs)
This commit is contained in:
@@ -103,18 +103,24 @@ namespace OpenSim.Region.ClientStack
|
||||
Packet packet = null;
|
||||
|
||||
int numBytes;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
numBytes = Server.EndReceiveFrom(result, ref epSender);
|
||||
}
|
||||
catch (System.Net.Sockets.SocketException e)
|
||||
{
|
||||
Console.WriteLine("Remote host Closed connection");
|
||||
|
||||
CloseEndPoint(epSender);
|
||||
|
||||
//Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
|
||||
// TODO : Actually only handle those states that we have control over, re-throw everything else,
|
||||
// TODO: implement cases as we encounter them.
|
||||
switch (e.SocketErrorCode)
|
||||
{
|
||||
case SocketError.AlreadyInProgress:
|
||||
case SocketError.NetworkReset:
|
||||
default:
|
||||
Console.WriteLine("Remote host Closed connection");
|
||||
CloseEndPoint(epSender);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Communications.Local
|
||||
public LocalLoginService LoginServices;
|
||||
public LocalInventoryService InvenServices;
|
||||
// public CAPSService CapsServices;
|
||||
private LocalSettings m_settings;
|
||||
private readonly LocalSettings m_settings;
|
||||
|
||||
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings)
|
||||
: base(serversInfo, httpServer, assetCache)
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Communications.Local
|
||||
|
||||
public override UserProfileData GetTheUser(string firstname, string lastname)
|
||||
{
|
||||
UserProfileData profile = this.m_userManager.getUserProfile(firstname, lastname);
|
||||
UserProfileData profile = this.m_userManager.GetUserProfile(firstname, lastname);
|
||||
if (profile != null)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Communications.Local
|
||||
Console.WriteLine("No User account found so creating a new one ");
|
||||
this.m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY);
|
||||
|
||||
profile = this.m_userManager.getUserProfile(firstname, lastname);
|
||||
profile = this.m_userManager.GetUserProfile(firstname, lastname);
|
||||
if (profile != null)
|
||||
{
|
||||
m_Parent.InvenServices.CreateNewUserInventory(profile.UUID);
|
||||
|
||||
@@ -10,36 +10,22 @@ namespace OpenSim.Region.Communications.Local
|
||||
{
|
||||
public class LocalUserServices : UserManagerBase, IUserServices
|
||||
{
|
||||
private CommunicationsLocal m_Parent;
|
||||
private readonly CommunicationsLocal m_Parent;
|
||||
|
||||
private NetworkServersInfo serversInfo;
|
||||
private uint defaultHomeX ;
|
||||
private uint defaultHomeY;
|
||||
private readonly NetworkServersInfo serversInfo;
|
||||
private readonly uint defaultHomeX ;
|
||||
private readonly uint defaultHomeY;
|
||||
|
||||
|
||||
public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo)
|
||||
{
|
||||
m_Parent = parent;
|
||||
this.serversInfo = serversInfo;
|
||||
|
||||
defaultHomeX = this.serversInfo.DefaultHomeLocX;
|
||||
defaultHomeY = this.serversInfo.DefaultHomeLocY;
|
||||
}
|
||||
|
||||
public UserProfileData GetUserProfile(string firstName, string lastName)
|
||||
{
|
||||
return GetUserProfile(firstName + " " + lastName);
|
||||
}
|
||||
|
||||
public UserProfileData GetUserProfile(string name)
|
||||
{
|
||||
return this.getUserProfile(name);
|
||||
}
|
||||
|
||||
public UserProfileData GetUserProfile(LLUUID avatarID)
|
||||
{
|
||||
return this.getUserProfile(avatarID);
|
||||
}
|
||||
|
||||
public UserProfileData SetupMasterUser(string firstName, string lastName)
|
||||
{
|
||||
return SetupMasterUser(firstName, lastName, "");
|
||||
@@ -47,7 +33,7 @@ namespace OpenSim.Region.Communications.Local
|
||||
|
||||
public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
|
||||
{
|
||||
UserProfileData profile = getUserProfile(firstName, lastName);
|
||||
UserProfileData profile = base.GetUserProfile(firstName, lastName);
|
||||
if (profile != null)
|
||||
{
|
||||
|
||||
@@ -57,7 +43,7 @@ namespace OpenSim.Region.Communications.Local
|
||||
Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account");
|
||||
this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY);
|
||||
|
||||
profile = getUserProfile(firstName, lastName);
|
||||
profile = base.GetUserProfile(firstName, lastName);
|
||||
|
||||
if (profile == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user