mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Merge branch 'master' of ssh://MyConnection/var/git/opensim
This commit is contained in:
@@ -789,23 +789,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an inventory folder. Although there is a packet in the Linden protocol for this, it may be
|
||||
/// legacy and not currently used (purge folder is used to remove folders from trash instead).
|
||||
/// Removes an inventory folder. This packet is sent when the user
|
||||
/// right-clicks a folder that's already in trash and chooses "purge"
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="folderID"></param>
|
||||
private void RemoveInventoryFolder(IClientAPI remoteClient, UUID folderID)
|
||||
private void RemoveInventoryFolder(IClientAPI remoteClient, List<UUID> folderIDs)
|
||||
{
|
||||
// Unclear is this handler is ever called by the Linden client, but it might
|
||||
|
||||
InventoryFolderBase folder = new InventoryFolderBase(folderID);
|
||||
folder.Owner = remoteClient.AgentId;
|
||||
InventoryFolderBase trash = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.TrashFolder);
|
||||
if (trash != null)
|
||||
{
|
||||
folder.ParentID = trash.ID;
|
||||
InventoryService.MoveFolder(folder);
|
||||
}
|
||||
m_log.DebugFormat("[SCENE INVENTORY]: RemoveInventoryFolders count {0}", folderIDs.Count);
|
||||
InventoryService.DeleteFolders(remoteClient.AgentId, folderIDs);
|
||||
}
|
||||
|
||||
private SceneObjectGroup GetGroupByPrim(uint localID)
|
||||
|
||||
@@ -441,9 +441,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
}
|
||||
|
||||
// We're going to send the reply async, because there may be
|
||||
// an enormous quantity of packets -- basically the entire inventory!
|
||||
// We don't want to block the client thread while all that is happening.
|
||||
SendInventoryDelegate d = SendInventoryAsync;
|
||||
d.BeginInvoke(remoteClient, folderID, ownerID, fetchFolders, fetchItems, sortOrder, SendInventoryComplete, d);
|
||||
}
|
||||
|
||||
delegate void SendInventoryDelegate(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
|
||||
|
||||
void SendInventoryAsync(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder)
|
||||
{
|
||||
SendInventoryUpdate(remoteClient, new InventoryFolderBase(folderID), fetchFolders, fetchItems);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SendInventoryComplete(IAsyncResult iar)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle the caps inventory descendents fetch.
|
||||
///
|
||||
@@ -537,7 +552,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
|
||||
{
|
||||
InventoryFolderBase folder = new InventoryFolderBase(folderID);
|
||||
InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId);
|
||||
folder = InventoryService.GetFolder(folder);
|
||||
if (folder != null)
|
||||
{
|
||||
|
||||
@@ -2143,9 +2143,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[SCENE]: Adding new {0} agent for {1} in {2}",
|
||||
((aCircuit.child == true) ? "child" : "root"), client.Name, RegionInfo.RegionName);
|
||||
m_log.Debug("[Scene] Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName);
|
||||
/*
|
||||
string logMsg = string.Format("[SCENE]: Adding new {0} agent for {1} in {2}",
|
||||
((aCircuit.child == true) ? "child" : "root"), client.Name,
|
||||
RegionInfo.RegionName);
|
||||
|
||||
m_log.Debug(logMsg);
|
||||
*/
|
||||
|
||||
CommsManager.UserProfileCacheService.AddNewUser(client.AgentId);
|
||||
|
||||
@@ -2154,7 +2159,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// HERE!!! Do the initial attachments right here
|
||||
// first agent upon login is a root agent by design.
|
||||
// All other AddNewClient calls find aCircuit.child to be true
|
||||
if (aCircuit.child == false)
|
||||
if (aCircuit == null || aCircuit.child == false)
|
||||
{
|
||||
sp.IsChildAgent = false;
|
||||
sp.RezAttachments();
|
||||
|
||||
Reference in New Issue
Block a user