From decd51f0811639169d63cb80fcc7dec931ea9530 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 11 Dec 2009 08:11:26 -0800 Subject: Attempt at fixing mantis #4411. --- .../Communications/Cache/UserProfileCacheService.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs') diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 9e12d948..cebd571 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -139,9 +139,16 @@ namespace OpenSim.Framework.Communications.Cache else { UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); - + if (userProfile != null) + { + if (userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") + userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; + if (userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") + userProfile.UserInventoryURI = m_commsManager.NetworkServersInfo.InventoryURL; + return AddToCaches(userProfile); + } else return null; } @@ -169,7 +176,14 @@ namespace OpenSim.Framework.Communications.Cache { UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID); if (userProfile != null) + { + if (userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") + userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; + if (userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") + userProfile.UserInventoryURI = m_commsManager.NetworkServersInfo.InventoryURL; + return AddToCaches(userProfile); + } else return null; } -- cgit v1.1 From 5f0478c4c445cf049f8668bb82468fa30d783baf Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 11 Dec 2009 08:28:24 -0800 Subject: Fix to make [bad] tests happy. --- OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs') diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index cebd571..29a9e14 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -142,9 +142,9 @@ namespace OpenSim.Framework.Communications.Cache if (userProfile != null) { - if (userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") + if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; - if (userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") + if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) userProfile.UserInventoryURI = m_commsManager.NetworkServersInfo.InventoryURL; return AddToCaches(userProfile); @@ -177,9 +177,9 @@ namespace OpenSim.Framework.Communications.Cache UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID); if (userProfile != null) { - if (userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") + if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; - if (userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") + if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) userProfile.UserInventoryURI = m_commsManager.NetworkServersInfo.InventoryURL; return AddToCaches(userProfile); -- cgit v1.1