Merge branch 'master' of /home/opensim/var/repo/opensim

integration
BlueWall 2012-05-21 21:03:55 -04:00
commit a150d3d1e5
3 changed files with 29 additions and 11 deletions

View File

@ -230,6 +230,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
"[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}",
sp.Name, position, sp.Scene.RegionInfo.RegionName);
if (!SetInTransit(sp.UUID))
{
m_log.DebugFormat(
"[ENTITY TRANSFER MODULE]: Ignoring within region teleport request of {0} {1} to {2} - agent is already in transit.",
sp.Name, sp.UUID, position);
}
// Teleport within the same region
if (IsOutsideRegion(sp.Scene, position) || position.Z < 0)
{
@ -268,6 +275,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
}
ResetFromTransit(sp.UUID);
}
/// <summary>

View File

@ -939,8 +939,8 @@ namespace OpenSim.Region.Framework.Scenes
sbyte invType, sbyte type, UUID olditemID)
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}",
// remoteClient.Name, name, folderID, olditemID);
// "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}, assetType {4}, inventoryType {5}",
// remoteClient.Name, name, folderID, olditemID, (AssetType)type, (InventoryType)invType);
if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
return;

View File

@ -303,6 +303,7 @@ namespace OpenSim.Services.InventoryService
public virtual bool AddFolder(InventoryFolderBase folder)
{
// m_log.DebugFormat("[XINVENTORY]: Add folder {0} type {1} in parent {2}", folder.Name, folder.Type, folder.ParentID);
InventoryFolderBase check = GetFolder(folder);
if (check != null)
return false;
@ -328,26 +329,35 @@ namespace OpenSim.Services.InventoryService
public virtual bool UpdateFolder(InventoryFolderBase folder)
{
// m_log.DebugFormat("[XINVENTORY]: Update folder {0} {1} ({2})", folder.Name, folder.Type, folder.ID);
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
InventoryFolderBase check = GetFolder(folder);
if (check == null)
return AddFolder(folder);
if (check.Type != -1 || xFolder.type != -1)
if ((check.Type != (short)AssetType.Unknown || xFolder.type != (short)AssetType.Unknown)
&& (check.Type != (short)AssetType.OutfitFolder || xFolder.type != (short)AssetType.OutfitFolder))
{
if (xFolder.version < check.Version)
{
// m_log.DebugFormat("[XINVENTORY]: {0} < {1} can't do", xFolder.version, check.Version);
return false;
}
check.Version = (ushort)xFolder.version;
xFolder = ConvertFromOpenSim(check);
//m_log.DebugFormat("[XINVENTORY]: Storing {0} {1} {2}", xFolder.folderName, xFolder.version, xFolder.type);
// m_log.DebugFormat(
// "[XINVENTORY]: Storing version only update to system folder {0} {1} {2}",
// xFolder.folderName, xFolder.version, xFolder.type);
return m_Database.StoreFolder(xFolder);
}
if (xFolder.version < check.Version)
xFolder.version = check.Version;
xFolder.folderID = check.ID;
return m_Database.StoreFolder(xFolder);
@ -433,7 +443,6 @@ namespace OpenSim.Services.InventoryService
public virtual bool UpdateItem(InventoryItemBase item)
{
// throw new Exception("urrgh");
if (!m_AllowDelete)
if (item.AssetType == (sbyte)AssetType.Link || item.AssetType == (sbyte)AssetType.LinkFolder)
return false;