Merge branch 'master' into careminster

Conflicts:
	OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
	OpenSim/Tests/Common/Mock/TestClient.cs
This commit is contained in:
Melanie
2012-03-31 02:18:02 +01:00
34 changed files with 943 additions and 424 deletions

View File

@@ -369,8 +369,11 @@ namespace OpenSim.Tests.Common
agentData.AgentID = agentId;
agentData.firstname = firstName;
agentData.lastname = "testlastname";
agentData.SessionID = UUID.Zero;
agentData.SecureSessionID = UUID.Zero;
// XXX: Sessions must be unique, otherwise one presence can overwrite another in NullPresenceData.
agentData.SessionID = UUID.Random();
agentData.SecureSessionID = UUID.Random();
agentData.circuitcode = 123;
agentData.BaseFolder = UUID.Zero;
agentData.InventoryFolder = UUID.Zero;
@@ -416,7 +419,10 @@ namespace OpenSim.Tests.Common
// We emulate the proper login sequence here by doing things in four stages
// Stage 0: login
scene.PresenceService.LoginAgent(agentData.AgentID.ToString(), agentData.SessionID, agentData.SecureSessionID);
// We need to punch through to the underlying service because scene will not, correctly, let us call it
// through it's reference to the LPSC
LocalPresenceServicesConnector lpsc = (LocalPresenceServicesConnector)scene.PresenceService;
lpsc.m_PresenceService.LoginAgent(agentData.AgentID.ToString(), agentData.SessionID, agentData.SecureSessionID);
// Stages 1 & 2
ScenePresence sp = IntroduceClientToScene(scene, agentData, TeleportFlags.ViaLogin);

View File

@@ -349,15 +349,9 @@ namespace OpenSim.Tests.Common.Mock
get { return m_agentId; }
}
public UUID SessionId
{
get { return UUID.Zero; }
}
public UUID SessionId { get; set; }
public UUID SecureSessionId
{
get { return UUID.Zero; }
}
public UUID SecureSessionId { get; set; }
public virtual string FirstName
{
@@ -381,11 +375,9 @@ namespace OpenSim.Tests.Common.Mock
get { return true; }
set { }
}
public bool IsLoggingOut
{
get { return false; }
set { }
}
public bool IsLoggingOut { get; set; }
public UUID ActiveGroupId
{
get { return UUID.Zero; }
@@ -451,6 +443,8 @@ namespace OpenSim.Tests.Common.Mock
m_lastName = agentData.lastname;
m_circuitCode = agentData.circuitcode;
m_scene = scene;
SessionId = agentData.SessionID;
SecureSessionId = agentData.SecureSessionID;
CapsSeedUrl = agentData.CapsPath;
ReceivedOfflineNotifications = new List<UUID>();
@@ -902,12 +896,29 @@ namespace OpenSim.Tests.Common.Mock
{
}
/// <summary>
/// This is a TestClient only method to do shutdown tasks that are normally carried out by LLUDPServer.RemoveClient()
/// </summary>
public void Logout()
{
// We must set this here so that the presence is removed from the PresenceService by the PresenceDetector
IsLoggingOut = true;
Close();
}
public void Close(bool c)
{
Close();
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
// Fire the callback for this connection closing
// This is necesary to get the presence detector to notice that a client has logged out.
if (OnConnectionClosed != null)
OnConnectionClosed(this);
m_scene.RemoveClient(AgentId, true);
}