Merge branch 'master' into careminster
commit
5f6a4c4111
|
@ -221,6 +221,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||||
int start, end;
|
int start, end;
|
||||||
if (TryParseRange(range, out start, out end))
|
if (TryParseRange(range, out start, out end))
|
||||||
{
|
{
|
||||||
|
|
||||||
// Before clamping start make sure we can satisfy it in order to avoid
|
// Before clamping start make sure we can satisfy it in order to avoid
|
||||||
// sending back the last byte instead of an error status
|
// sending back the last byte instead of an error status
|
||||||
if (start >= texture.Data.Length)
|
if (start >= texture.Data.Length)
|
||||||
|
@ -266,9 +267,14 @@ namespace OpenSim.Capabilities.Handlers
|
||||||
response.Body.Write(texture.Data, 0, texture.Data.Length);
|
response.Body.Write(texture.Data, 0, texture.Data.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// if (response.StatusCode < 200 || response.StatusCode > 299)
|
||||||
// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
|
// m_log.WarnFormat(
|
||||||
// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
|
// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
|
||||||
|
// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
|
||||||
|
// else
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})",
|
||||||
|
// texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryParseRange(string header, out int start, out int end)
|
private bool TryParseRange(string header, out int start, out int end)
|
||||||
|
|
|
@ -181,6 +181,15 @@ namespace OpenSim.Capabilities.Handlers
|
||||||
contents.descendents = contents.items.Array.Count + contents.categories.Array.Count;
|
contents.descendents = contents.items.Array.Count + contents.categories.Array.Count;
|
||||||
contents.version = version;
|
contents.version = version;
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[WEB FETCH INV DESC HANDLER]: Replying to request for folder {0} (fetch items {1}, fetch folders {2}) with {3} items and {4} folders for agent {5}",
|
||||||
|
// invFetch.folder_id,
|
||||||
|
// invFetch.fetch_items,
|
||||||
|
// invFetch.fetch_folders,
|
||||||
|
// contents.items.Array.Count,
|
||||||
|
// contents.categories.Array.Count,
|
||||||
|
// invFetch.owner_id);
|
||||||
|
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +204,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||||
/// <param name="sortOrder"></param>
|
/// <param name="sortOrder"></param>
|
||||||
/// <param name="version"></param>
|
/// <param name="version"></param>
|
||||||
/// <returns>An empty InventoryCollection if the inventory look up failed</returns>
|
/// <returns>An empty InventoryCollection if the inventory look up failed</returns>
|
||||||
public InventoryCollection Fetch(
|
private InventoryCollection Fetch(
|
||||||
UUID agentID, UUID folderID, UUID ownerID,
|
UUID agentID, UUID folderID, UUID ownerID,
|
||||||
bool fetchFolders, bool fetchItems, int sortOrder, out int version)
|
bool fetchFolders, bool fetchItems, int sortOrder, out int version)
|
||||||
{
|
{
|
||||||
|
@ -228,8 +237,82 @@ namespace OpenSim.Capabilities.Handlers
|
||||||
containingFolder.ID = folderID;
|
containingFolder.ID = folderID;
|
||||||
containingFolder.Owner = agentID;
|
containingFolder.Owner = agentID;
|
||||||
containingFolder = m_InventoryService.GetFolder(containingFolder);
|
containingFolder = m_InventoryService.GetFolder(containingFolder);
|
||||||
|
|
||||||
if (containingFolder != null)
|
if (containingFolder != null)
|
||||||
|
{
|
||||||
version = containingFolder.Version;
|
version = containingFolder.Version;
|
||||||
|
|
||||||
|
if (fetchItems)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
List<InventoryItemBase> linkedItemsToAdd = new List<InventoryItemBase>();
|
||||||
|
|
||||||
|
foreach (InventoryItemBase item in contents.Items)
|
||||||
|
{
|
||||||
|
if (item.AssetType == (int)AssetType.Link)
|
||||||
|
{
|
||||||
|
InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
|
||||||
|
|
||||||
|
// Take care of genuinely broken links where the target doesn't exist
|
||||||
|
// HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
|
||||||
|
// but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
|
||||||
|
// rather than having to keep track of every folder requested in the recursion.
|
||||||
|
if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link && linkedItem.AssetType == (int)AssetType.Object)
|
||||||
|
linkedItemsToAdd.Add(linkedItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (InventoryItemBase linkedItem in linkedItemsToAdd)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}",
|
||||||
|
linkedItem.Name, folderID, agentID);
|
||||||
|
|
||||||
|
contents.Items.Insert(0, linkedItem);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
// If the folder requested contains links, then we need to send those folders first, otherwise the links
|
||||||
|
// will be broken in the viewer.
|
||||||
|
HashSet<UUID> linkedItemFolderIdsToSend = new HashSet<UUID>();
|
||||||
|
foreach (InventoryItemBase item in contents.Items)
|
||||||
|
{
|
||||||
|
if (item.AssetType == (int)AssetType.Link)
|
||||||
|
{
|
||||||
|
InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID));
|
||||||
|
|
||||||
|
// Take care of genuinely broken links where the target doesn't exist
|
||||||
|
// HACK: Also, don't follow up links that just point to other links. In theory this is legitimate,
|
||||||
|
// but no viewer has been observed to set these up and this is the lazy way of avoiding cycles
|
||||||
|
// rather than having to keep track of every folder requested in the recursion.
|
||||||
|
if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link)
|
||||||
|
{
|
||||||
|
// We don't need to send the folder if source and destination of the link are in the same
|
||||||
|
// folder.
|
||||||
|
if (linkedItem.Folder != containingFolder.ID)
|
||||||
|
linkedItemFolderIdsToSend.Add(linkedItem.Folder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}",
|
||||||
|
linkedItemFolderId, folderID, agentID);
|
||||||
|
|
||||||
|
int dummyVersion;
|
||||||
|
InventoryCollection linkedCollection
|
||||||
|
= Fetch(
|
||||||
|
agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion);
|
||||||
|
|
||||||
|
contents.Folders.AddRange(linkedCollection.Folders);
|
||||||
|
contents.Items.AddRange(linkedCollection.Items);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -114,6 +114,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0}", sp.Name);
|
||||||
|
|
||||||
List<AvatarAttachment> attachments = sp.Appearance.GetAttachments();
|
List<AvatarAttachment> attachments = sp.Appearance.GetAttachments();
|
||||||
foreach (AvatarAttachment attach in attachments)
|
foreach (AvatarAttachment attach in attachments)
|
||||||
{
|
{
|
||||||
|
|
|
@ -319,11 +319,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Passing something to another avatar or a an object will already
|
// Passing something to another avatar or a an object will already
|
||||||
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
|
||||||
item = InventoryService.GetItem(item);
|
item = InventoryService.GetItem(item);
|
||||||
if (item.Owner != remoteClient.AgentId)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
|
if (item.Owner != remoteClient.AgentId)
|
||||||
|
return;
|
||||||
|
|
||||||
if (UUID.Zero == transactionID)
|
if (UUID.Zero == transactionID)
|
||||||
{
|
{
|
||||||
item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255);
|
item.Flags = (item.Flags & ~(uint)255) | (itemUpd.Flags & (uint)255);
|
||||||
|
@ -371,8 +372,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Error(
|
m_log.ErrorFormat(
|
||||||
"[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update.");
|
"[AGENTINVENTORY]: Item id {0} not found for an inventory item update for {1}.",
|
||||||
|
itemID, remoteClient.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,10 +182,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private const int LAND_VELOCITYMAG_MAX = 12;
|
private const int LAND_VELOCITYMAG_MAX = 12;
|
||||||
|
|
||||||
public bool IsRestrictedToRegion;
|
|
||||||
|
|
||||||
public string JID = String.Empty;
|
|
||||||
|
|
||||||
private float m_health = 100f;
|
private float m_health = 100f;
|
||||||
|
|
||||||
protected ulong crossingFromRegion;
|
protected ulong crossingFromRegion;
|
||||||
|
|
|
@ -67,11 +67,12 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
{
|
{
|
||||||
IConfig myConfig = source.Configs["Startup"];
|
IConfig myConfig = source.Configs["Startup"];
|
||||||
enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
|
enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
|
||||||
//enabledYN = true;
|
|
||||||
if (enabledYN)
|
if (enabledYN)
|
||||||
MainConsole.Instance.Commands.AddCommand("RegionCombinerModule", false, "fix-phantoms",
|
MainConsole.Instance.Commands.AddCommand(
|
||||||
"Fix phantom objects", "Fixes phantom objects after an import to megaregions", FixPhantoms);
|
"RegionCombinerModule", false, "fix-phantoms", "fix-phantoms",
|
||||||
}
|
"Fixes phantom objects after an import to megaregions", FixPhantoms);
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue