* re-enabled AssetNotFound code
* turned script asset fetching asynchronousThreadPoolClientBranch
parent
4c2e304ce6
commit
4c6e5a5090
|
@ -457,21 +457,22 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
|
||||
public void AssetNotFound(LLUUID assetID)
|
||||
{
|
||||
m_log.ErrorFormat("[ASSET CACHE]: Unhandled AssetNotFound for {0}", assetID);
|
||||
//m_log.ErrorFormat("[ASSET CACHE]: Unhandled AssetNotFound for {0}", assetID);
|
||||
|
||||
//if (this.RequestedTextures.ContainsKey(assetID))
|
||||
//{
|
||||
// m_log.WarnFormat("[ASSET CACHE]: sending image not found for {0}", assetID);
|
||||
// AssetRequest req = this.RequestedTextures[assetID];
|
||||
// ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket();
|
||||
// notFound.ImageID.ID = assetID;
|
||||
// req.RequestUser.OutPacket(notFound);
|
||||
// this.RequestedTextures.Remove(assetID);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// m_log.ErrorFormat("[ASSET CACHE]: Cound not send image not found for {0}", assetID);
|
||||
//}
|
||||
AssetRequest req;
|
||||
|
||||
if (RequestedTextures.TryGetValue(assetID, out req))
|
||||
{
|
||||
m_log.WarnFormat("[ASSET CACHE]: sending image not found for {0}", assetID);
|
||||
ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket();
|
||||
notFound.ImageID.ID = assetID;
|
||||
req.RequestUser.OutPacket(notFound, ThrottleOutPacketType.Unknown);
|
||||
RequestedTextures.Remove(assetID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("[ASSET CACHE]: Asset [{0}] not found, but couldn't find any users to send to ", assetID);
|
||||
}
|
||||
}
|
||||
|
||||
private int CalculateNumPackets(byte[] data)
|
||||
|
|
|
@ -33,6 +33,7 @@ using System.Xml.Serialization;
|
|||
using libsecondlife;
|
||||
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Scenes.Scripting;
|
||||
|
@ -147,33 +148,35 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <returns></returns>
|
||||
public void StartScript(TaskInventoryItem item)
|
||||
{
|
||||
// m_log.InfoFormat(
|
||||
// "[PRIMINVENTORY]: " +
|
||||
// "Starting script {0}, {1} in prim {2}, {3}",
|
||||
// item.Name, item.ItemID, Name, UUID);
|
||||
// m_log.InfoFormat(
|
||||
// "[PRIMINVENTORY]: " +
|
||||
// "Starting script {0}, {1} in prim {2}, {3}",
|
||||
// item.Name, item.ItemID, Name, UUID);
|
||||
AddFlag(LLObject.ObjectFlags.Scripted);
|
||||
|
||||
if (!((m_parentGroup.Scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts))
|
||||
{
|
||||
AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false);
|
||||
AssetCache cache = m_parentGroup.Scene.AssetCache;
|
||||
|
||||
if (rezAsset != null)
|
||||
cache.GetAsset(item.AssetID, delegate(LLUUID assetID, AssetBase asset)
|
||||
{
|
||||
|
||||
string script = Helpers.FieldToUTF8String(rezAsset.Data);
|
||||
m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script);
|
||||
m_parentGroup.AddActiveScriptCount(1);
|
||||
}
|
||||
else
|
||||
if (asset.FullID == LLUUID.Zero)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[PRIMINVENTORY]: " +
|
||||
"Couldn't start script {0}, {1} since asset ID {2} could not be found",
|
||||
item.Name, item.ItemID, item.AssetID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string script = Helpers.FieldToUTF8String(asset.Data);
|
||||
m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID,item.ItemID,script);
|
||||
m_parentGroup.AddActiveScriptCount(1);
|
||||
ScheduleFullUpdate();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start a script which is in this prim's inventory.
|
||||
|
@ -384,7 +387,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
if (m_inventorySerial > 0)
|
||||
{
|
||||
client.SendTaskInventory(m_uuid, (short) m_inventorySerial,
|
||||
client.SendTaskInventory(m_uuid, (short)m_inventorySerial,
|
||||
Helpers.StringToField(m_inventoryFileName));
|
||||
return true;
|
||||
}
|
||||
|
@ -433,8 +436,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
fileData = Helpers.StringToField(invString.BuildString);
|
||||
|
||||
// m_log.InfoFormat(
|
||||
// "[PRIMINVENTORY]: RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData));
|
||||
// m_log.InfoFormat(
|
||||
// "[PRIMINVENTORY]: RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData));
|
||||
|
||||
if (fileData.Length > 2)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue