From 58af0fabeb909452e1db615afd05a1bb78678191 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 31 Jul 2008 15:53:07 +0000 Subject: * minor: reduce coupling by passing in only session id to CachedUserInfo --- OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 12 ++++++++++-- .../Communications/Cache/UserProfileCacheService.cs | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 11516f0..4c0aaa2 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -101,11 +101,19 @@ namespace OpenSim.Framework.Communications.Cache m_userProfile = userProfile; } - public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile, IClientAPI remoteClient) + /// + /// Constructor + /// + /// + /// + /// + /// Session id of the user. This is used in subsequent security checks. + /// + public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile, LLUUID sessionId) { m_commsManager = commsManager; m_userProfile = userProfile; - m_session_id = remoteClient.SessionId; + m_session_id = sessionId; } /// diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index d6421b0..5f98c08 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -71,7 +71,7 @@ namespace OpenSim.Framework.Communications.Cache if (!m_userProfiles.ContainsKey(remoteClient.AgentId)) { UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(remoteClient.AgentId); - CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userProfile, remoteClient); + CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userProfile, remoteClient.SessionId); if (userInfo.UserProfile != null) { -- cgit v1.1