diff --git a/OpenSim/Data/IUserData.cs b/OpenSim/Data/IUserData.cs
index d3631d5a1e..79ba27b954 100644
--- a/OpenSim/Data/IUserData.cs
+++ b/OpenSim/Data/IUserData.cs
@@ -101,8 +101,15 @@ namespace OpenSim.Data
/// UserProfile to add
void AddNewUserProfile(UserProfileData user);
- ///
- /// Updates an existing user profile
+ ///
+ /// Adds a temporary user profile. A temporary userprofile is one that should exist only for the lifetime of
+ /// the process.
+ ///
+ ///
+ void AddTemporaryUserProfile(UserProfileData userProfile);
+
+ ///
+ /// Updates an existing user profile
///
/// UserProfile to update
bool UpdateUserProfile(UserProfileData user);
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs
index 167a837142..5ee50968c2 100644
--- a/OpenSim/Data/UserDataBase.cs
+++ b/OpenSim/Data/UserDataBase.cs
@@ -46,6 +46,12 @@ namespace OpenSim.Data
public UserProfileData GetUserByUri(Uri uri) { return null; }
public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey);
public abstract void AddNewUserProfile(UserProfileData user);
+
+ public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
+ {
+ // Deliberately blank - database plugins shouldn't store temporary profiles.
+ }
+
public abstract bool UpdateUserProfile(UserProfileData user);
public abstract void AddNewUserAgent(UserAgentData agent);
public abstract void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms);
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index fb24c15ef1..9a3e211f5b 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -33,6 +33,13 @@ namespace OpenSim.Framework.Communications
{
public interface IUserService
{
+ ///
+ /// Add a temporary user profile.
+ ///
+ /// A temporary user profile is one that should exist only for the lifetime of the process.
+ ///
+ void AddTemporaryUserProfile(UserProfileData userProfile);
+
///
/// Loads a user profile by name
///
diff --git a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
index 1cfeaf1fc2..3b78c9980f 100644
--- a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
+++ b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
@@ -64,6 +64,14 @@ namespace OpenSim.Framework.Communications
return null;
}
+ public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
+ {
+ lock (m_profiles)
+ {
+ m_profiles[userProfile.ID] = userProfile;
+ }
+ }
+
public UserProfileData GetUserByUri(Uri uri) { return null; }
public List GeneratePickerResults(UUID queryID, string query) { return null; }
public UserAgentData GetAgentByUUID(UUID user) { return null; }
diff --git a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
index 178c356219..a5ee549767 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
@@ -90,6 +90,11 @@ namespace OpenSim.Framework.Communications.Tests
private class FakeUserService : IUserService
{
+ public void AddTemporaryUserProfile(UserProfileData userProfile)
+ {
+ throw new NotImplementedException();
+ }
+
public UserProfileData GetUserProfile(string firstName, string lastName)
{
throw new NotImplementedException();
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
index 42fdea5fc0..d0c1b3b846 100644
--- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
+++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
@@ -280,8 +280,8 @@ namespace OpenSim.Framework.Communications.Tests
[Test]
public void T023_TestAuthenticatedLoginAlreadyLoggedIn()
{
- Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()");
- log4net.Config.XmlConfigurator.Configure();
+ //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()");
+ //log4net.Config.XmlConfigurator.Configure();
string error_already_logged = "You appear to be already logged in. " +
"If this is not the case please wait for your session to timeout. " +
@@ -317,7 +317,7 @@ namespace OpenSim.Framework.Communications.Tests
responseData = (Hashtable)response.Value;
Assert.That(responseData["message"], Is.EqualTo("Hello folks"));
- Console.WriteLine("Finished T023_TestAuthenticatedLoginAlreadyLoggedIn()");
+ //Console.WriteLine("Finished T023_TestAuthenticatedLoginAlreadyLoggedIn()");
}
public class TestLoginToRegionConnector : ILoginServiceToRegionsConnector
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index b6a736209a..133f810a8a 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -88,9 +88,16 @@ namespace OpenSim.Framework.Communications
m_plugins.AddRange(DataPluginFactory.LoadDataPlugins(provider, connect));
}
- #region Get UserProfile
-
- // see IUserService
+ #region UserProfile
+
+ public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
+ {
+ foreach (IUserDataPlugin plugin in m_plugins)
+ {
+ plugin.AddTemporaryUserProfile(userProfile);
+ }
+ }
+
public virtual UserProfileData GetUserProfile(string fname, string lname)
{
foreach (IUserDataPlugin plugin in m_plugins)
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs
index f54345113d..941f815fa4 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs
@@ -74,6 +74,11 @@ namespace OpenSim.Region.Communications.OGS1
public void ResetAttachments(UUID userID) {}
public void LogoutUsers(UUID regionID) {}
+ public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
+ {
+ // Not interested
+ }
+
public UserProfileData GetUserByUri(Uri uri)
{
WebRequest request = WebRequest.Create(uri);
diff --git a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
index 58996e2d8a..f376bf0f8a 100644
--- a/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestUserDataPlugin.cs
@@ -65,6 +65,11 @@ namespace OpenSim.Tests.Common.Mock
public void Initialise() {}
public void Dispose() {}
+
+ public void AddTemporaryUserProfile(UserProfileData userProfile)
+ {
+ // Not interested
+ }
public void AddNewUserProfile(UserProfileData user)
{