aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
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
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')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs12
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs7
3 files changed, 18 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 {
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 108c1d0..2b3ffd8 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -689,6 +689,13 @@ namespace OpenSim
689 m_log.ErrorFormat("[CONSOLE]: Failed to find user {0} {1}", firstName, lastName); 689 m_log.ErrorFormat("[CONSOLE]: Failed to find user {0} {1}", firstName, lastName);
690 return; 690 return;
691 } 691 }
692
693 CachedUserInfo userInfo = m_commsManager.UserProfileCacheService.GetUserDetails(userProfile.ID);
694 if (null == userInfo)
695 {
696 m_log.ErrorFormat("[CONSOLE]: Failed to find user info for {0} {1} {2}", firstName, lastName, userProfile.ID);
697 return;
698 }
692 } 699 }
693 700
694 /// <summary> 701 /// <summary>