diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 0040718..e22dff6 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -63,6 +63,33 @@ namespace OpenSim.Framework.Communications.Cache | |||
63 | /// A new user has moved into a region in this instance so retrieve their profile from the user service. | 63 | /// A new user has moved into a region in this instance so retrieve their profile from the user service. |
64 | /// </summary> | 64 | /// </summary> |
65 | /// <param name="userID"></param> | 65 | /// <param name="userID"></param> |
66 | public void AddNewUser(IClientAPI remoteClient) | ||
67 | { | ||
68 | // Potential fix - Multithreading issue. | ||
69 | lock (m_userProfiles) | ||
70 | { | ||
71 | if (!m_userProfiles.ContainsKey(remoteClient.AgentId)) | ||
72 | { | ||
73 | UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(remoteClient.AgentId); | ||
74 | CachedUserInfo userInfo = new CachedUserInfo(m_commsManager, userProfile, remoteClient); | ||
75 | |||
76 | if (userInfo.UserProfile != null) | ||
77 | { | ||
78 | // The inventory for the user will be populated when they actually enter the scene | ||
79 | m_userProfiles.Add(remoteClient.AgentId, userInfo); | ||
80 | } | ||
81 | else | ||
82 | { | ||
83 | m_log.ErrorFormat("[USER CACHE]: User profile for user {0} not found.", remoteClient.AgentId); | ||
84 | } | ||
85 | } | ||
86 | } | ||
87 | } | ||
88 | |||
89 | /// <summary> | ||
90 | /// A new user has moved into a region in this instance so retrieve their profile from the user service. | ||
91 | /// </summary> | ||
92 | /// <param name="userID"></param> | ||
66 | public void AddNewUser(LLUUID userID) | 93 | public void AddNewUser(LLUUID userID) |
67 | { | 94 | { |
68 | // Potential fix - Multithreading issue. | 95 | // Potential fix - Multithreading issue. |
@@ -119,7 +146,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
119 | CachedUserInfo userInfo = GetUserDetails(userID); | 146 | CachedUserInfo userInfo = GetUserDetails(userID); |
120 | if (userInfo != null) | 147 | if (userInfo != null) |
121 | { | 148 | { |
122 | m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); | 149 | m_commsManager.SecureInventoryService.RequestInventoryForUser(userID, userInfo.SessionID, userInfo.InventoryReceive); |
123 | //IInventoryServices invService = userInfo.GetInventoryService(); | 150 | //IInventoryServices invService = userInfo.GetInventoryService(); |
124 | //if (invService != null) | 151 | //if (invService != null) |
125 | //{ | 152 | //{ |