Added AllowLoginWithoutInventory to LoginService, to be overwritten in subclasses. Default is false. HGLoginAuthService sets it true. Better error handling dealing with inventory service faults.
parent
f1e091c5f7
commit
d4f6750f82
|
@ -324,5 +324,11 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
|
|
||||||
m_regionsConnector.LogOffUserFromGrid(SimInfo.RegionHandle, theUser.ID, theUser.CurrentAgent.SecureSessionID, "Logging you off");
|
m_regionsConnector.LogOffUserFromGrid(SimInfo.RegionHandle, theUser.ID, theUser.CurrentAgent.SecureSessionID, "Logging you off");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool AllowLoginWithoutInventory()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -371,9 +371,12 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
responseData["classified_categories"] = classifiedCategories;
|
responseData["classified_categories"] = classifiedCategories;
|
||||||
responseData["ui-config"] = uiConfig;
|
responseData["ui-config"] = uiConfig;
|
||||||
|
|
||||||
responseData["inventory-skeleton"] = agentInventory;
|
if (agentInventory != null)
|
||||||
|
{
|
||||||
|
responseData["inventory-skeleton"] = agentInventory;
|
||||||
|
responseData["inventory-root"] = inventoryRoot;
|
||||||
|
}
|
||||||
responseData["inventory-skel-lib"] = inventoryLibrary;
|
responseData["inventory-skel-lib"] = inventoryLibrary;
|
||||||
responseData["inventory-root"] = inventoryRoot;
|
|
||||||
responseData["inventory-lib-root"] = inventoryLibRoot;
|
responseData["inventory-lib-root"] = inventoryLibRoot;
|
||||||
responseData["gestures"] = activeGestures;
|
responseData["gestures"] = activeGestures;
|
||||||
responseData["inventory-lib-owner"] = inventoryLibraryOwner;
|
responseData["inventory-lib-owner"] = inventoryLibraryOwner;
|
||||||
|
@ -386,8 +389,6 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
responseData["region_x"] = (Int32)(RegionX * Constants.RegionSize);
|
responseData["region_x"] = (Int32)(RegionX * Constants.RegionSize);
|
||||||
responseData["region_y"] = (Int32)(RegionY * Constants.RegionSize);
|
responseData["region_y"] = (Int32)(RegionY * Constants.RegionSize);
|
||||||
|
|
||||||
//responseData["inventory-lib-root"] = new ArrayList(); // todo
|
|
||||||
|
|
||||||
if (m_buddyList != null)
|
if (m_buddyList != null)
|
||||||
{
|
{
|
||||||
responseData["buddy-list"] = m_buddyList.ToArray();
|
responseData["buddy-list"] = m_buddyList.ToArray();
|
||||||
|
|
|
@ -197,7 +197,7 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
UUID agentID = userProfile.ID;
|
UUID agentID = userProfile.ID;
|
||||||
InventoryData inventData;
|
InventoryData inventData = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -209,16 +209,24 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
"[LOGIN END]: Error retrieving inventory skeleton of agent {0} - {1}",
|
"[LOGIN END]: Error retrieving inventory skeleton of agent {0} - {1}",
|
||||||
agentID, e);
|
agentID, e);
|
||||||
|
|
||||||
return logResponse.CreateLoginInventoryFailedResponse();
|
// Let's not panic
|
||||||
|
if (!AllowLoginWithoutInventory())
|
||||||
|
return logResponse.CreateLoginInventoryFailedResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList AgentInventoryArray = inventData.InventoryArray;
|
if (inventData != null)
|
||||||
|
{
|
||||||
|
ArrayList AgentInventoryArray = inventData.InventoryArray;
|
||||||
|
|
||||||
Hashtable InventoryRootHash = new Hashtable();
|
Hashtable InventoryRootHash = new Hashtable();
|
||||||
InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString();
|
InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString();
|
||||||
ArrayList InventoryRoot = new ArrayList();
|
ArrayList InventoryRoot = new ArrayList();
|
||||||
InventoryRoot.Add(InventoryRootHash);
|
InventoryRoot.Add(InventoryRootHash);
|
||||||
userProfile.RootInventoryFolderID = inventData.RootFolderID;
|
userProfile.RootInventoryFolderID = inventData.RootFolderID;
|
||||||
|
|
||||||
|
logResponse.InventoryRoot = InventoryRoot;
|
||||||
|
logResponse.InventorySkeleton = AgentInventoryArray;
|
||||||
|
}
|
||||||
|
|
||||||
// Inventory Library Section
|
// Inventory Library Section
|
||||||
Hashtable InventoryLibRootHash = new Hashtable();
|
Hashtable InventoryLibRootHash = new Hashtable();
|
||||||
|
@ -228,8 +236,6 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
|
|
||||||
logResponse.InventoryLibRoot = InventoryLibRoot;
|
logResponse.InventoryLibRoot = InventoryLibRoot;
|
||||||
logResponse.InventoryLibraryOwner = GetLibraryOwner();
|
logResponse.InventoryLibraryOwner = GetLibraryOwner();
|
||||||
logResponse.InventoryRoot = InventoryRoot;
|
|
||||||
logResponse.InventorySkeleton = AgentInventoryArray;
|
|
||||||
logResponse.InventoryLibrary = GetInventoryLibrary();
|
logResponse.InventoryLibrary = GetInventoryLibrary();
|
||||||
|
|
||||||
logResponse.CircuitCode = Util.RandomClass.Next();
|
logResponse.CircuitCode = Util.RandomClass.Next();
|
||||||
|
@ -1011,7 +1017,15 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
/// </param>
|
/// </param>
|
||||||
protected void AddActiveGestures(LoginResponse response, UserProfileData theUser)
|
protected void AddActiveGestures(LoginResponse response, UserProfileData theUser)
|
||||||
{
|
{
|
||||||
List<InventoryItemBase> gestures = m_inventoryService.GetActiveGestures(theUser.ID);
|
List<InventoryItemBase> gestures = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
gestures = m_inventoryService.GetActiveGestures(theUser.ID);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.Debug("[LOGIN]: Unable to retrieve active gestures from inventory server. Reason: " + e.Message);
|
||||||
|
}
|
||||||
//m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count);
|
//m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count);
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
if (gestures != null)
|
if (gestures != null)
|
||||||
|
@ -1089,5 +1103,10 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
|
|
||||||
return new InventoryData(AgentInventoryArray, rootID);
|
return new InventoryData(AgentInventoryArray, rootID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual bool AllowLoginWithoutInventory()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue