From 03438f7d449a09e28dcb1543b2075d70b2573ffc Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 23 Sep 2009 16:24:26 +0100
Subject: minor: remove double initialization of user appearance module in
Grid.UserServer.Main
---
OpenSim/Framework/Communications/Services/LoginService.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs
index bf59f8e..a6cd918 100644
--- a/OpenSim/Framework/Communications/Services/LoginService.cs
+++ b/OpenSim/Framework/Communications/Services/LoginService.cs
@@ -1221,11 +1221,13 @@ namespace OpenSim.Framework.Communications.Services
{
return Util.CreateUnknownUserErrorResponse();
}
+
UUID.TryParse((string)requestData["session_id"], out guess_sid);
if (guess_sid == UUID.Zero)
{
return Util.CreateUnknownUserErrorResponse();
}
+
if (m_userManager.VerifySession(guess_aid, guess_sid))
{
authed = "TRUE";
@@ -1243,6 +1245,5 @@ namespace OpenSim.Framework.Communications.Services
response.Value = responseData;
return response;
}
-
}
-}
+}
\ No newline at end of file
--
cgit v1.1
From 7870152d23db4cb6f5834d4921fac17feb717220 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 24 Sep 2009 14:54:12 +0100
Subject: Allow load/save iar password checks to be done in grid mode This
should allow load/save iar to work for grid mode as long as the grid user
service is later than this revision Grid services of earlier revisions will
always erroneously report incorrect password. This will be addressed
shortly.
---
OpenSim/Framework/Communications/IUserService.cs | 16 +++++++++--
.../Communications/Tests/Cache/AssetCacheTests.cs | 5 ++++
.../Framework/Communications/UserManagerBase.cs | 32 +++++++++++++++++++---
3 files changed, 47 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index 725225d..15c5a96 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Communications
/// The agent that who's friends list is being updated
/// The agent that is getting or loosing permissions
/// A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects
- void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
+ void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
///
/// Logs off a user on the user server
@@ -137,9 +137,21 @@ namespace OpenSim.Framework.Communications
// But since Scenes only have IUserService references, I'm placing it here for now.
bool VerifySession(UUID userID, UUID sessionID);
+ ///
+ /// Authenticate a user by their password.
+ ///
+ ///
+ /// This is used by callers outside the login process that want to
+ /// verify a user who has given their password.
+ ///
+ /// This should probably also be in IAuthentication but is here for the same reasons as VerifySession() is
+ ///
+ ///
+ ///
+ ///
+ bool AuthenticateUserByPassword(UUID userID, string password);
// Temporary Hack until we move everything to the new service model
void SetInventoryService(IInventoryService invService);
-
}
}
diff --git a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
index ac0dc6d..a757282 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
@@ -149,6 +149,11 @@ namespace OpenSim.Framework.Communications.Tests
{
throw new NotImplementedException();
}
+
+ public virtual bool AuthenticateUserByPassword(UUID userID, string password)
+ {
+ throw new NotImplementedException();
+ }
}
}
}
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 58174a0..1abd733 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -44,7 +44,8 @@ namespace OpenSim.Framework.Communications
///
/// Base class for user management (create, read, etc)
///
- public abstract class UserManagerBase : IUserService, IUserAdminService, IAvatarService, IMessagingService, IAuthentication
+ public abstract class UserManagerBase
+ : IUserService, IUserAdminService, IAvatarService, IMessagingService, IAuthentication
{
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -93,9 +94,9 @@ namespace OpenSim.Framework.Communications
public void AddPlugin(string provider, string connect)
{
m_plugins.AddRange(DataPluginFactory.LoadDataPlugins(provider, connect));
- }
+ }
- #region UserProfile
+ #region UserProfile
public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
{
@@ -891,7 +892,10 @@ namespace OpenSim.Framework.Communications
if (userProfile != null && userProfile.CurrentAgent != null)
{
- m_log.DebugFormat("[USER AUTH]: Verifying session {0} for {1}; current session {2}", sessionID, userID, userProfile.CurrentAgent.SessionID);
+ m_log.DebugFormat(
+ "[USER AUTH]: Verifying session {0} for {1}; current session {2}",
+ sessionID, userID, userProfile.CurrentAgent.SessionID);
+
if (userProfile.CurrentAgent.SessionID == sessionID)
{
return true;
@@ -901,6 +905,26 @@ namespace OpenSim.Framework.Communications
return false;
}
+ public virtual bool AuthenticateUserByPassword(UUID userID, string password)
+ {
+// m_log.DebugFormat("[USER AUTH]: Authenticating user {0} given password {1}", userID, password);
+
+ UserProfileData userProfile = GetUserProfile(userID);
+
+ if (null == userProfile)
+ return false;
+
+ string md5PasswordHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + userProfile.PasswordSalt);
+
+// m_log.DebugFormat(
+// "[USER AUTH]: Submitted hash {0}, stored hash {1}", md5PasswordHash, userProfile.PasswordHash);
+
+ if (md5PasswordHash == userProfile.PasswordHash)
+ return true;
+ else
+ return false;
+ }
+
#endregion
}
}
--
cgit v1.1
From 5757afe7665543e8b3ed4a322a7d6e095dafcdb3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 26 Sep 2009 07:48:21 -0700
Subject: First pass at the heart surgery for grid services. Compiles and runs
minimally. A few bugs to catch now.
---
OpenSim/Framework/Communications/Clients/RegionClient.cs | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/Clients/RegionClient.cs b/OpenSim/Framework/Communications/Clients/RegionClient.cs
index 73e2db0..3419ce2 100644
--- a/OpenSim/Framework/Communications/Clients/RegionClient.cs
+++ b/OpenSim/Framework/Communications/Clients/RegionClient.cs
@@ -35,6 +35,8 @@ using System.Text;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
+using GridRegion = OpenSim.Services.Interfaces.GridRegion;
+
using log4net;
namespace OpenSim.Framework.Communications.Clients
@@ -43,7 +45,7 @@ namespace OpenSim.Framework.Communications.Clients
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- public bool DoCreateChildAgentCall(RegionInfo region, AgentCircuitData aCircuit, string authKey, out string reason)
+ public bool DoCreateChildAgentCall(GridRegion region, AgentCircuitData aCircuit, string authKey, out string reason)
{
reason = String.Empty;
@@ -166,7 +168,7 @@ namespace OpenSim.Framework.Communications.Clients
}
- public bool DoChildAgentUpdateCall(RegionInfo region, IAgentData cAgentData)
+ public bool DoChildAgentUpdateCall(GridRegion region, IAgentData cAgentData)
{
// Eventually, we want to use a caps url instead of the agentID
string uri = string.Empty;
@@ -260,7 +262,7 @@ namespace OpenSim.Framework.Communications.Clients
return true;
}
- public bool DoRetrieveRootAgentCall(RegionInfo region, UUID id, out IAgentData agent)
+ public bool DoRetrieveRootAgentCall(GridRegion region, UUID id, out IAgentData agent)
{
agent = null;
// Eventually, we want to use a caps url instead of the agentID
@@ -348,7 +350,7 @@ namespace OpenSim.Framework.Communications.Clients
}
- public bool DoCloseAgentCall(RegionInfo region, UUID id)
+ public bool DoCloseAgentCall(GridRegion region, UUID id)
{
string uri = string.Empty;
try
@@ -391,7 +393,7 @@ namespace OpenSim.Framework.Communications.Clients
return true;
}
- public bool DoCreateObjectCall(RegionInfo region, ISceneObject sog, string sogXml2, bool allowScriptCrossing)
+ public bool DoCreateObjectCall(GridRegion region, ISceneObject sog, string sogXml2, bool allowScriptCrossing)
{
ulong regionHandle = GetRegionHandle(region.RegionHandle);
string uri
@@ -474,7 +476,7 @@ namespace OpenSim.Framework.Communications.Clients
}
- public bool DoCreateObjectCall(RegionInfo region, UUID userID, UUID itemID)
+ public bool DoCreateObjectCall(GridRegion region, UUID userID, UUID itemID)
{
ulong regionHandle = GetRegionHandle(region.RegionHandle);
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + UUID.Zero + "/" + regionHandle.ToString() + "/";
@@ -646,7 +648,7 @@ namespace OpenSim.Framework.Communications.Clients
return false;
}
- public virtual void SendUserInformation(RegionInfo regInfo, AgentCircuitData aCircuit)
+ public virtual void SendUserInformation(GridRegion regInfo, AgentCircuitData aCircuit)
{
}
--
cgit v1.1
From 68e40a87cafcab580ab484956f187068c098e84e Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 26 Sep 2009 21:29:54 -0700
Subject: Poof! on LocalBackend. CommsManager.GridServices deleted.
---
OpenSim/Framework/Communications/CommunicationsManager.cs | 5 -----
1 file changed, 5 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index e9a6adb..9f377a6 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -59,11 +59,6 @@ namespace OpenSim.Framework.Communications
}
protected IMessagingService m_messageService;
- public IGridServices GridService
- {
- get { return m_gridService; }
- }
- protected IGridServices m_gridService;
public UserProfileCacheService UserProfileCacheService
{
--
cgit v1.1
From 0f05bbb4a20224492febf17604fa23ef2486fa1a Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 28 Sep 2009 05:54:37 -0700
Subject: Deleted some files that aren't being used anymore.
---
OpenSim/Framework/Communications/IGridServices.cs | 92 -----------------------
OpenSim/Framework/Communications/IHyperlink.cs | 38 ----------
2 files changed, 130 deletions(-)
delete mode 100644 OpenSim/Framework/Communications/IGridServices.cs
delete mode 100644 OpenSim/Framework/Communications/IHyperlink.cs
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
deleted file mode 100644
index 6365919..0000000
--- a/OpenSim/Framework/Communications/IGridServices.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System.Collections.Generic;
-using OpenMetaverse;
-
-namespace OpenSim.Framework.Communications
-{
- public interface IGridServices
- {
- string gdebugRegionName { get; set; }
-
- ///
- /// If true, then regions will accept logins from the user service. If false, then they will not.
- ///
- bool RegionLoginsEnabled { get; set; }
-
- ///
- /// Register a region with the grid service.
- ///
- ///
- ///
- /// Thrown if region registration failed
- RegionCommsListener RegisterRegion(RegionInfo regionInfos);
-
- ///
- /// Deregister a region with the grid service.
- ///
- ///
- ///
- /// Thrown if region deregistration failed
- bool DeregisterRegion(RegionInfo regionInfo);
-
- ///
- /// Get information about the regions neighbouring the given co-ordinates.
- ///
- ///
- ///
- ///
- List RequestNeighbours(uint x, uint y);
-
- RegionInfo RequestNeighbourInfo(ulong regionHandle);
- RegionInfo RequestNeighbourInfo(UUID regionID);
- RegionInfo RequestNeighbourInfo(string name);
- RegionInfo RequestNeighbourInfo(string host, uint port);
-
- RegionInfo RequestClosestRegion(string regionName);
- Dictionary GetGridSettings();
- List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
- // not complete yet, only contains the fields needed for ParcelInfoReqeust
- LandData RequestLandData(ulong regionHandle, uint x, uint y);
-
- ///
- /// Get information about regions starting with the provided name.
- ///
- ///
- /// The name to match against.
- ///
- ///
- /// The maximum number of results to return.
- ///
- ///
- /// A list of s of regions with matching name. If the
- /// grid-server couldn't be contacted or returned an error, return null.
- ///
- List RequestNamedRegions(string name, int maxNumber);
- }
-}
diff --git a/OpenSim/Framework/Communications/IHyperlink.cs b/OpenSim/Framework/Communications/IHyperlink.cs
deleted file mode 100644
index 5057386..0000000
--- a/OpenSim/Framework/Communications/IHyperlink.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the OpenSimulator Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-namespace OpenSim.Framework.Communications
-{
- public interface IHyperlink
- {
- bool IsHyperlinkRegion(ulong handle);
- RegionInfo GetHyperlinkRegion(ulong handle);
- ulong FindRegionHandle(ulong handle);
- bool SendUserInformation(RegionInfo region, AgentCircuitData aCircuit);
- void AdjustUserInformation(AgentCircuitData aCircuit);
- }
-}
--
cgit v1.1
From 1006a2254c733655bf11d3cf25e41d1b43bd5f6a Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 30 Sep 2009 13:36:03 +0100
Subject: Make create user to the Right Thing with regard to salting user
passwords
---
OpenSim/Framework/Communications/UserManagerBase.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 1abd733..86238b1 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -650,15 +650,17 @@ namespace OpenSim.Framework.Communications
public virtual UUID AddUser(
string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID)
{
- string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
UserProfileData user = new UserProfileData();
+
+ user.PasswordSalt = Util.Md5Hash(UUID.Random().ToString());
+ string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + user.PasswordSalt);
+
user.HomeLocation = new Vector3(128, 128, 100);
user.ID = SetUUID;
user.FirstName = firstName;
user.SurName = lastName;
user.PasswordHash = md5PasswdHash;
- user.PasswordSalt = String.Empty;
user.Created = Util.UnixTimeSinceEpoch();
user.HomeLookAt = new Vector3(100, 100, 100);
user.HomeRegionX = regX;
--
cgit v1.1
From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Thu, 1 Oct 2009 01:00:09 +0900
Subject: Formatting cleanup.
---
.../Communications/Cache/CachedUserInfo.cs | 8 ++---
.../Cache/UserProfileCacheService.cs | 34 +++++++++++-----------
.../Communications/CommunicationsManager.cs | 4 +--
OpenSim/Framework/Communications/IAvatarService.cs | 2 +-
.../Framework/Communications/IUserAdminService.cs | 2 +-
OpenSim/Framework/Communications/IUserService.cs | 6 ++--
.../Osp/OspInventoryWrapperPlugin.cs | 6 ++--
.../Framework/Communications/Osp/OspResolver.cs | 12 ++++----
.../Communications/Services/LoginService.cs | 2 +-
.../Communications/TemporaryUserProfilePlugin.cs | 4 +--
.../Communications/Tests/Cache/AssetCacheTests.cs | 4 +--
.../Tests/Cache/UserProfileCacheServiceTests.cs | 12 ++++----
.../Communications/Tests/LoginServiceTests.cs | 2 +-
.../Framework/Communications/UserManagerBase.cs | 8 ++---
14 files changed, 53 insertions(+), 53 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 238810a..8c39ca8 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache
/// Stores user profile and inventory data received from backend services for a particular user.
///
public class CachedUserInfo
- {
+ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
////
@@ -190,7 +190,7 @@ namespace OpenSim.Framework.Communications.Cache
resolvedFolders.Add(folder);
resolvedFolderDictionary[folder.ID] = folder;
parentFolder.AddChildFolder(folder);
- }
+ }
}
} // foreach (folder in pendingCategorizationFolders[parentFolder.ID])
@@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
- /// and needs to be changed.
+ /// and needs to be changed.
///
///
///
@@ -500,7 +500,7 @@ namespace OpenSim.Framework.Communications.Cache
InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID);
if (oldParentFolder != null)
- {
+ {
oldParentFolder.RemoveChildFolder(folderID);
parentFolder.AddChildFolder(folder);
}
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 7f1c7e9..2a1da50 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
/// User profiles indexed by name
///
private readonly Dictionary m_userProfilesByName
- = new Dictionary();
+ = new Dictionary();
///
/// The root library folder.
@@ -125,26 +125,26 @@ namespace OpenSim.Framework.Communications.Cache
///
/// If the user isn't in cache then the user is requested from the profile service.
///
- /// null if no user details are found
+ /// null if no user details are found
public CachedUserInfo GetUserDetails(string fname, string lname)
{
lock (m_userProfilesByName)
- {
+ {
CachedUserInfo userInfo;
- if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo))
+ if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo))
{
return userInfo;
- }
+ }
else
- {
+ {
UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname);
if (userProfile != null)
- return AddToCaches(userProfile);
+ return AddToCaches(userProfile);
else
return null;
- }
+ }
}
}
@@ -185,20 +185,20 @@ namespace OpenSim.Framework.Communications.Cache
// probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via
// returning a read only class from the cache).
// public bool StoreProfile(UserProfileData userProfile)
-// {
+// {
// lock (m_userProfilesById)
-// {
+// {
// CachedUserInfo userInfo = GetUserDetails(userProfile.ID);
-//
+//
// if (userInfo != null)
// {
-// userInfo.m_userProfile = userProfile;
+// userInfo.m_userProfile = userProfile;
// m_commsManager.UserService.UpdateUserProfile(userProfile);
-//
+//
// return true;
// }
// }
-//
+//
// return false;
// }
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Cache
}
}
- return createdUserInfo;
+ return createdUserInfo;
}
///
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Cache
{
if (m_userProfilesById.ContainsKey(userId))
{
- CachedUserInfo userInfo = m_userProfilesById[userId];
+ CachedUserInfo userInfo = m_userProfilesById[userId];
m_userProfilesById.Remove(userId);
lock (m_userProfilesByName)
@@ -244,7 +244,7 @@ namespace OpenSim.Framework.Communications.Cache
return true;
}
- }
+ }
return false;
}
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 9f377a6..2410f31 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -90,8 +90,8 @@ namespace OpenSim.Framework.Communications
public IUserAdminService UserAdminService
{
get { return m_userAdminService; }
- }
- protected IUserAdminService m_userAdminService;
+ }
+ protected IUserAdminService m_userAdminService;
///
/// Constructor
diff --git a/OpenSim/Framework/Communications/IAvatarService.cs b/OpenSim/Framework/Communications/IAvatarService.cs
index 4afc58f..760aa62 100644
--- a/OpenSim/Framework/Communications/IAvatarService.cs
+++ b/OpenSim/Framework/Communications/IAvatarService.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications
/// Update avatar appearance information
///
///
- ///
+ ///
void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
}
}
diff --git a/OpenSim/Framework/Communications/IUserAdminService.cs b/OpenSim/Framework/Communications/IUserAdminService.cs
index 15b989d..423b49b 100644
--- a/OpenSim/Framework/Communications/IUserAdminService.cs
+++ b/OpenSim/Framework/Communications/IUserAdminService.cs
@@ -66,6 +66,6 @@ namespace OpenSim.Framework.Communications
///
///
/// true if the update was successful, false otherwise
- bool ResetUserPassword(string firstName, string lastName, string newPassword);
+ bool ResetUserPassword(string firstName, string lastName, string newPassword);
}
}
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index 15c5a96..2872e5e 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Communications
/// The agent that who's friends list is being updated
/// The agent that is getting or loosing permissions
/// A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects
- void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
+ void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
///
/// Logs off a user on the user server
@@ -130,7 +130,7 @@ namespace OpenSim.Framework.Communications
///
/// A List of FriendListItems that contains info about the user's friends.
/// Always returns a list even if the user has no friends
- ///
+ ///
List GetUserFriendList(UUID friendlistowner);
// This probably shouldn't be here, it belongs to IAuthentication
@@ -149,7 +149,7 @@ namespace OpenSim.Framework.Communications
///
///
///
- bool AuthenticateUserByPassword(UUID userID, string password);
+ bool AuthenticateUserByPassword(UUID userID, string password);
// Temporary Hack until we move everything to the new service model
void SetInventoryService(IInventoryService invService);
diff --git a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
index 98d0e0f..e96c5e8 100644
--- a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
+++ b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Osp
public string Name { get { return "OspInventoryWrapperPlugin"; } }
public string Version { get { return "0.1"; } }
- public void Initialise() {}
+ public void Initialise() {}
public void Initialise(string connect) {}
public void Dispose() {}
@@ -80,9 +80,9 @@ namespace OpenSim.Framework.Communications.Osp
}
protected InventoryItemBase PostProcessItem(InventoryItemBase item)
- {
+ {
item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_commsManager);
- return item;
+ return item;
}
public List getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); }
diff --git a/OpenSim/Framework/Communications/Osp/OspResolver.cs b/OpenSim/Framework/Communications/Osp/OspResolver.cs
index e98317a..32f0efc 100644
--- a/OpenSim/Framework/Communications/Osp/OspResolver.cs
+++ b/OpenSim/Framework/Communications/Osp/OspResolver.cs
@@ -33,13 +33,13 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Framework.Communications.Osp
-{
+{
///
/// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for
/// identifying user profiles or supplying a simple name if no profile is available.
///
public class OspResolver
- {
+ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public const string OSPA_PREFIX = "ospa:";
@@ -73,7 +73,7 @@ namespace OpenSim.Framework.Communications.Osp
{
return
OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName;
- }
+ }
///
/// Resolve an osp string into the most suitable internal OpenSim identifier.
@@ -89,13 +89,13 @@ namespace OpenSim.Framework.Communications.Osp
/// is returned.
///
public static UUID ResolveOspa(string ospa, CommunicationsManager commsManager)
- {
+ {
if (!ospa.StartsWith(OSPA_PREFIX))
return UUID.Zero;
m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa);
- string ospaMeat = ospa.Substring(OSPA_PREFIX.Length);
+ string ospaMeat = ospa.Substring(OSPA_PREFIX.Length);
string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY);
foreach (string tuple in ospaTuples)
@@ -162,7 +162,7 @@ namespace OpenSim.Framework.Communications.Osp
tempUserProfile.ID = HashName(tempUserProfile.Name);
m_log.DebugFormat(
- "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);
+ "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);
commsManager.UserService.AddTemporaryUserProfile(tempUserProfile);
return tempUserProfile.ID;
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs
index a6cd918..922cd49 100644
--- a/OpenSim/Framework/Communications/Services/LoginService.cs
+++ b/OpenSim/Framework/Communications/Services/LoginService.cs
@@ -1072,7 +1072,7 @@ namespace OpenSim.Framework.Communications.Services
///
///
///
- /// true if the region was successfully contacted, false otherwise
+ /// true if the region was successfully contacted, false otherwise
protected abstract bool PrepareLoginToRegion(
RegionInfo regionInfo, UserProfileData user, LoginResponse response, IPEndPoint client);
diff --git a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
index 43f1440..d56211f 100644
--- a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
+++ b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
@@ -33,7 +33,7 @@ using OpenMetaverse;
using OpenSim.Data;
namespace OpenSim.Framework.Communications
-{
+{
///
/// Plugin for managing temporary user profiles.
///
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications
public string Name { get { return "TemporaryUserProfilePlugin"; } }
public string Version { get { return "0.1"; } }
- public void Initialise() {}
+ public void Initialise() {}
public void Initialise(string connect) {}
public void Dispose() {}
diff --git a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
index a757282..caaebd7 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
@@ -152,8 +152,8 @@ namespace OpenSim.Framework.Communications.Tests
public virtual bool AuthenticateUserByPassword(UUID userID, string password)
{
- throw new NotImplementedException();
- }
+ throw new NotImplementedException();
+ }
}
}
}
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
index e5d8895..830c877 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Framework.Communications.Tests
timedOut = true;
lock (this)
- {
+ {
UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -150,7 +150,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
- {
+ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -171,7 +171,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
- {
+ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -206,7 +206,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
- {
+ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -271,7 +271,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
- {
+ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -311,7 +311,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
- {
+ {
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
index 0a9d2ae..e891d9c 100644
--- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
+++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
@@ -318,7 +318,7 @@ namespace OpenSim.Framework.Communications.Tests
{
TestHelper.InMethod();
- //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()");
+ //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()");
//log4net.Config.XmlConfigurator.Configure();
string error_already_logged = "You appear to be already logged in. " +
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 86238b1..bf4f331 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -94,9 +94,9 @@ namespace OpenSim.Framework.Communications
public void AddPlugin(string provider, string connect)
{
m_plugins.AddRange(DataPluginFactory.LoadDataPlugins(provider, connect));
- }
+ }
- #region UserProfile
+ #region UserProfile
public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
{
@@ -924,8 +924,8 @@ namespace OpenSim.Framework.Communications
if (md5PasswordHash == userProfile.PasswordHash)
return true;
else
- return false;
- }
+ return false;
+ }
#endregion
}
--
cgit v1.1
From 606e831ff5337fb5e94dcebf9d6852bd4c434d4b Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Thu, 1 Oct 2009 09:38:36 +0900
Subject: Formatting cleanup.
---
OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 2 +-
OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 4 ++--
OpenSim/Framework/Communications/IUserService.cs | 2 +-
OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 8c39ca8..aa71536 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -219,7 +219,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Fetch inventory for this user.
///
- /// This has to be executed as a separate step once user information is retreived.
+ /// This has to be executed as a separate step once user information is retreived.
/// This will occur synchronously if the inventory service is in the same process as this class, and
/// asynchronously otherwise.
public void FetchInventory()
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 2a1da50..9e12d948 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Get details of the given user.
///
- /// If the user isn't in cache then the user is requested from the profile service.
+ /// If the user isn't in cache then the user is requested from the profile service.
///
/// null if no user details are found
public CachedUserInfo GetUserDetails(string fname, string lname)
@@ -151,7 +151,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Get details of the given user.
///
- /// If the user isn't in cache then the user is requested from the profile service.
+ /// If the user isn't in cache then the user is requested from the profile service.
///
/// null if no user details are found
public CachedUserInfo GetUserDetails(UUID userID)
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index 2872e5e..dfa059d 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Framework.Communications
///
/// The agent for whom we're retreiving the friends Data.
///
- /// A List of FriendListItems that contains info about the user's friends.
+ /// A List of FriendListItems that contains info about the user's friends.
/// Always returns a list even if the user has no friends
///
List GetUserFriendList(UUID friendlistowner);
diff --git a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
index d56211f..2413055 100644
--- a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
+++ b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
@@ -35,7 +35,7 @@ using OpenSim.Data;
namespace OpenSim.Framework.Communications
{
///
- /// Plugin for managing temporary user profiles.
+ /// Plugin for managing temporary user profiles.
///
public class TemporaryUserProfilePlugin : IUserDataPlugin
{
--
cgit v1.1