Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim

mysql-performance
Melanie 2009-12-21 15:48:46 +00:00
commit 51ecdf0148
2 changed files with 15 additions and 2 deletions

View File

@ -142,6 +142,7 @@ namespace OpenSim.Framework.Communications.Cache
if (userProfile != null) if (userProfile != null)
{ {
if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null)
userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL;
if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null)
@ -177,6 +178,7 @@ namespace OpenSim.Framework.Communications.Cache
UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID); UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID);
if (userProfile != null) if (userProfile != null)
{ {
if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null)
userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL;
if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null)

View File

@ -56,6 +56,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
private ISessionAuthInventoryService m_HGService; private ISessionAuthInventoryService m_HGService;
private string m_LocalGridInventoryURI = string.Empty; private string m_LocalGridInventoryURI = string.Empty;
private string LocalGridInventory
{
get
{
if (m_LocalGridInventoryURI == null || m_LocalGridInventoryURI == "")
m_LocalGridInventoryURI = m_Scene.CommsManager.NetworkServersInfo.InventoryURL;
return m_LocalGridInventoryURI;
}
}
public Type ReplaceableInterface public Type ReplaceableInterface
{ {
get { return null; } get { return null; }
@ -533,7 +544,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
string userInventoryServerURI = Util.ServerURI(uinfo.UserProfile.UserInventoryURI); string userInventoryServerURI = Util.ServerURI(uinfo.UserProfile.UserInventoryURI);
string uri = m_LocalGridInventoryURI.TrimEnd('/'); string uri = LocalGridInventory.TrimEnd('/');
if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) if ((userInventoryServerURI == uri) || (userInventoryServerURI == ""))
{ {
@ -545,7 +556,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
private string GetUserInventoryURI(UUID userID) private string GetUserInventoryURI(UUID userID)
{ {
string invURI = m_LocalGridInventoryURI; string invURI = LocalGridInventory;
CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID);
if ((uinfo == null) || (uinfo.UserProfile == null)) if ((uinfo == null) || (uinfo.UserProfile == null))