Additional debug messages, and bug fix in RemoteInventoryServiceConnector.cs, where the scene reference wasn't being set.

arthursv
Diva Canto 2009-08-14 08:43:46 -07:00
parent 21b5ebdc1f
commit 332d1b5f2f
2 changed files with 12 additions and 2 deletions

View File

@ -455,15 +455,24 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
private bool IsLocalGridUser(UUID userID) private bool IsLocalGridUser(UUID userID)
{ {
if (m_UserProfileService == null) if (m_UserProfileService == null)
{
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: IsLocalGridUser, no profile service. Returning false.");
return false; return false;
}
CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID);
if (uinfo == null) if (uinfo == null)
{
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: IsLocalGridUser, no profile for user {0}. Returning false.", userID);
return true; return true;
}
string userInventoryServerURI = HGNetworkServersInfo.ServerURI(uinfo.UserProfile.UserInventoryURI); string userInventoryServerURI = HGNetworkServersInfo.ServerURI(uinfo.UserProfile.UserInventoryURI);
string uri = m_LocalGridInventoryURI.TrimEnd('/');
if ((userInventoryServerURI == m_LocalGridInventoryURI) || (userInventoryServerURI == "")) m_log.DebugFormat("[HG INVENTORY CONNECTOR]: IsLocalGridUser, comparing {0} to {1}.", userInventoryServerURI, uri);
if ((userInventoryServerURI == uri) || (userInventoryServerURI == ""))
{ {
return true; return true;
} }

View File

@ -104,12 +104,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
m_Scene = scene;
if (!m_Enabled) if (!m_Enabled)
return; return;
if (!m_Initialized) if (!m_Initialized)
{ {
m_Scene = scene;
// ugh! // ugh!
scene.CommsManager.UserProfileCacheService.SetInventoryService(this); scene.CommsManager.UserProfileCacheService.SetInventoryService(this);
scene.CommsManager.UserService.SetInventoryService(this); scene.CommsManager.UserService.SetInventoryService(this);