aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-07-31 15:53:07 +0000
committerJustin Clarke Casey2008-07-31 15:53:07 +0000
commit58af0fabeb909452e1db615afd05a1bb78678191 (patch)
treee71f82df658c8b6aa5ed0308ddc1762cf6586038 /OpenSim/Framework/Communications
parentMantis#1868. Thank you kindly, HomerHorwitz for a patch that: (diff)
downloadopensim-SC_OLD-58af0fabeb909452e1db615afd05a1bb78678191.zip
opensim-SC_OLD-58af0fabeb909452e1db615afd05a1bb78678191.tar.gz
opensim-SC_OLD-58af0fabeb909452e1db615afd05a1bb78678191.tar.bz2
opensim-SC_OLD-58af0fabeb909452e1db615afd05a1bb78678191.tar.xz
* minor: reduce coupling by passing in only session id to CachedUserInfo
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs12
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs2
2 files changed, 11 insertions, 3 deletions
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
101 m_userProfile = userProfile; 101 m_userProfile = userProfile;
102 } 102 }
103 103
104 public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile, IClientAPI remoteClient) 104 /// <summary>
105 /// Constructor
106 /// </summary>
107 /// <param name="commsManager"></param>
108 /// <param name="userProfile"></param>
109 /// <param name="sessionId">
110 /// Session id of the user. This is used in subsequent security checks.
111 /// </param>
112 public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile, LLUUID sessionId)
105 { 113 {
106 m_commsManager = commsManager; 114 m_commsManager = commsManager;
107 m_userProfile = userProfile; 115 m_userProfile = userProfile;
108 m_session_id = remoteClient.SessionId; 116 m_session_id = sessionId;
109 } 117 }
110 118
111 /// <summary> 119 /// <summary>
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
71 if (!m_userProfiles.ContainsKey(remoteClient.AgentId)) 71 if (!m_userProfiles.ContainsKey(remoteClient.AgentId))
72 { 72 {
73 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(remoteClient.AgentId); 73 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(remoteClient.AgentId);
74 CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userProfile, remoteClient); 74 CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userProfile, remoteClient.SessionId);
75 75
76 if (userInfo.UserProfile != null) 76 if (userInfo.UserProfile != null)
77 { 77 {