Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor

avinationmerge
sacha 2010-12-23 08:14:43 +00:00
commit 98f0b4c72a
19 changed files with 234 additions and 176 deletions

View File

@ -1131,6 +1131,12 @@ namespace OpenSim.Client.MXP.ClientStack
// SL Specific, Ignore. (Remove from IClient) // SL Specific, Ignore. (Remove from IClient)
} }
public void SendAbortXferPacket(ulong xferID)
{
}
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
{ {
// SL Specific, Ignore. (Remove from IClient) // SL Specific, Ignore. (Remove from IClient)

View File

@ -675,6 +675,11 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
public virtual void SendAbortXferPacket(ulong xferID)
{
throw new System.NotImplementedException();
}
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
{ {
throw new System.NotImplementedException(); throw new System.NotImplementedException();

View File

@ -1344,7 +1344,11 @@ namespace OpenSim.Framework.Capabilities
/// <returns></returns> /// <returns></returns>
public string uploaderCaps(byte[] data, string path, string param) public string uploaderCaps(byte[] data, string path, string param)
{ {
m_log.WarnFormat("[CAPS] baked texture upload completed for {0}",newAssetID); handlerUpLoad = OnUpLoad;
if (handlerUpLoad != null)
{
Util.FireAndForget(delegate(object o) { handlerUpLoad(newAssetID, data); });
}
string res = String.Empty; string res = String.Empty;
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
@ -1356,12 +1360,6 @@ namespace OpenSim.Framework.Capabilities
httpListener.RemoveStreamHandler("POST", uploaderPath); httpListener.RemoveStreamHandler("POST", uploaderPath);
handlerUpLoad = OnUpLoad;
if (handlerUpLoad != null)
{
handlerUpLoad(newAssetID, data);
}
m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID); m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
return res; return res;

View File

@ -1062,6 +1062,8 @@ namespace OpenSim.Framework
void SendXferPacket(ulong xferID, uint packet, byte[] data); void SendXferPacket(ulong xferID, uint packet, byte[] data);
void SendAbortXferPacket(ulong xferID);
void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent,
float PriceObjectScaleFactor, float PriceObjectScaleFactor,

View File

@ -53,8 +53,8 @@ namespace OpenSim.Framework.Servers.HttpServer
private static byte[] ReadFully(Stream stream) private static byte[] ReadFully(Stream stream)
{ {
byte[] buffer = new byte[32768]; byte[] buffer = new byte[1024];
using (MemoryStream ms = new MemoryStream()) using (MemoryStream ms = new MemoryStream(1024*256))
{ {
while (true) while (true)
{ {

View File

@ -127,7 +127,7 @@ namespace OpenSim.Framework
m_threads.Add(threadInfo.Thread.ManagedThreadId, threadInfo); m_threads.Add(threadInfo.Thread.ManagedThreadId, threadInfo);
} }
private static bool RemoveThread(int threadID) public static bool RemoveThread(int threadID)
{ {
lock (m_threads) lock (m_threads)
return m_threads.Remove(threadID); return m_threads.Remove(threadID);

View File

@ -2097,6 +2097,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(sendXfer, ThrottleOutPacketType.Asset); OutPacket(sendXfer, ThrottleOutPacketType.Asset);
} }
public void SendAbortXferPacket(ulong xferID)
{
AbortXferPacket xferItem = (AbortXferPacket)PacketPool.Instance.GetPacket(PacketType.AbortXfer);
xferItem.XferID.ID = xferID;
OutPacket(xferItem, ThrottleOutPacketType.Asset);
}
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,

View File

@ -40,8 +40,8 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
private Scene m_scene; private Scene m_scene;
private Dictionary<string, XferRequest> Requests = new Dictionary<string, XferRequest>(); private Dictionary<string, XferRequest> Requests = new Dictionary<string, XferRequest>();
private List<XferRequest> RequestTime = new List<XferRequest>(); private List<XferRequest> RequestTime = new List<XferRequest>();
public Dictionary<string, byte[]> NewFiles = new Dictionary<string, byte[]>(); private Dictionary<string, FileData> NewFiles = new Dictionary<string, FileData>();
public Dictionary<ulong, XferDownLoad> Transfers = new Dictionary<ulong, XferDownLoad>(); private Dictionary<ulong, XferDownLoad> Transfers = new Dictionary<ulong, XferDownLoad>();
public struct XferRequest public struct XferRequest
@ -52,6 +52,12 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
public DateTime timeStamp; public DateTime timeStamp;
} }
private class FileData
{
public byte[] Data;
public int Count;
}
#region IRegionModule Members #region IRegionModule Members
public void Initialise(Scene scene, IConfigSource config) public void Initialise(Scene scene, IConfigSource config)
@ -89,20 +95,22 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
lock (NewFiles) lock (NewFiles)
{ {
if (NewFiles.ContainsKey(fileName)) if (NewFiles.ContainsKey(fileName))
{ NewFiles[fileName].Count++;
NewFiles[fileName] = data;
}
else else
{ {
NewFiles.Add(fileName, data); FileData fd = new FileData();
fd.Count = 1;
fd.Data = data;
NewFiles.Add(fileName, fd);
} }
} }
if (Requests.ContainsKey(fileName)) // This should not be here
{ //if (Requests.ContainsKey(fileName))
RequestXfer(Requests[fileName].remoteClient, Requests[fileName].xferID, fileName); //{
Requests.Remove(fileName); // RequestXfer(Requests[fileName].remoteClient, Requests[fileName].xferID, fileName);
} // Requests.Remove(fileName);
//}
return true; return true;
} }
@ -113,6 +121,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
{ {
client.OnRequestXfer += RequestXfer; client.OnRequestXfer += RequestXfer;
client.OnConfirmXfer += AckPacket; client.OnConfirmXfer += AckPacket;
client.OnAbortXfer += AbortXfer;
} }
/// <summary> /// <summary>
@ -125,20 +134,35 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
{ {
lock (NewFiles) lock (NewFiles)
{ {
if (RequestTime.Count > 0)
{
TimeSpan ts = new TimeSpan(DateTime.UtcNow.Ticks - RequestTime[0].timeStamp.Ticks);
if (ts.TotalSeconds > 30)
{
ulong zxferid = RequestTime[0].xferID;
remoteClient.SendAbortXferPacket(zxferid);
RemoveXferData(zxferid);
RemoveOrDecrement(fileName);
}
}
if (NewFiles.ContainsKey(fileName)) if (NewFiles.ContainsKey(fileName))
{ {
if (!Transfers.ContainsKey(xferID)) if (!Transfers.ContainsKey(xferID))
{ {
byte[] fileData = NewFiles[fileName]; byte[] fileData = NewFiles[fileName].Data;
XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient); XferDownLoad transaction = new XferDownLoad(fileName, fileData, xferID, remoteClient);
Transfers.Add(xferID, transaction); Transfers.Add(xferID, transaction);
NewFiles.Remove(fileName);
if (transaction.StartSend()) if (transaction.StartSend())
{ {
Transfers.Remove(xferID); RemoveXferData(xferID);
} }
// The transaction for this file is either complete or on its way
RemoveOrDecrement(fileName);
} }
} }
else else
@ -150,6 +174,8 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
{ {
Requests.Remove(RequestTime[0].fileName); Requests.Remove(RequestTime[0].fileName);
RequestTime.RemoveAt(0); RequestTime.RemoveAt(0);
// Do we want to abort this here?
//remoteClient.SendAbortXfer(xferID);
} }
} }
@ -165,22 +191,84 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
} }
} }
} }
} }
public void AckPacket(IClientAPI remoteClient, ulong xferID, uint packet) public void AckPacket(IClientAPI remoteClient, ulong xferID, uint packet)
{ {
if (Transfers.ContainsKey(xferID)) lock (NewFiles) // This is actually to lock Transfers
{ {
if (Transfers[xferID].AckPacket(packet)) if (Transfers.ContainsKey(xferID))
{ {
XferDownLoad dl = Transfers[xferID];
if (Transfers[xferID].AckPacket(packet))
{ {
Transfers.Remove(xferID); {
RemoveXferData(xferID);
RemoveOrDecrement(dl.FileName);
}
}
else
{
if (Requests.ContainsKey(dl.FileName))
{
//
XferRequest req = Requests[dl.FileName];
req.timeStamp = DateTime.UtcNow;
Requests[dl.FileName] = req;
}
} }
} }
} }
} }
private void RemoveXferData(ulong xferID)
{
// NewFiles must be locked!
if (Transfers.ContainsKey(xferID))
{
// Qualifier distinguishes between the OpenMetaverse version and the nested class
XferModule.XferDownLoad xferItem = Transfers[xferID];
//string filename = xferItem.FileName;
Transfers.Remove(xferID);
xferItem.Data = new byte[0]; // Clear the data
xferItem.DataPointer = 0;
// If the abort comes in
if (Requests.ContainsKey(xferItem.FileName))
Requests.Remove(xferItem.FileName);
}
}
public void AbortXfer(IClientAPI remoteClient, ulong xferID)
{
lock (NewFiles)
{
if (Transfers.ContainsKey(xferID))
RemoveOrDecrement(Transfers[xferID].FileName);
RemoveXferData(xferID);
}
}
private void RemoveOrDecrement(string fileName)
{
// NewFiles must be locked
if (NewFiles.ContainsKey(fileName))
{
if (NewFiles[fileName].Count == 1)
NewFiles.Remove(fileName);
else
NewFiles[fileName].Count--;
}
}
#region Nested type: XferDownLoad #region Nested type: XferDownLoad
public class XferDownLoad public class XferDownLoad

View File

@ -620,8 +620,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
} }
catch (WebException e) catch (WebException e)
{ {
m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to {0}} the host didn't respond ({2})", m_log.ErrorFormat("[GRID INSTANT MESSAGE]: Error sending message to {0} the host didn't respond " + e.ToString(), reginfo.ServerURI.ToString());
reginfo.ServerURI, e.Message);
} }
return false; return false;

View File

@ -602,6 +602,12 @@ namespace OpenSim.Region.Examples.SimpleModule
{ {
} }
public virtual void SendAbortXferPacket(ulong xferID)
{
}
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,

View File

@ -195,13 +195,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// in this prim's inventory.</returns> /// in this prim's inventory.</returns>
int RemoveInventoryItem(UUID itemID); int RemoveInventoryItem(UUID itemID);
/// <summary>
/// Return the name with which a client can request a xfer of this prim's inventory metadata
/// </summary>
string GetInventoryFileName();
bool GetInventoryFileName(IClientAPI client, uint localID);
/// <summary> /// <summary>
/// Serialize all the metadata for the items in this prim's inventory ready for sending to the client /// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
/// </summary> /// </summary>

View File

@ -951,23 +951,12 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="primLocalID"></param> /// <param name="primLocalID"></param>
public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID) public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID)
{ {
SceneObjectGroup group = GetGroupByPrim(primLocalID); SceneObjectPart part = GetSceneObjectPart(primLocalID);
if (group != null) if (part == null)
{ return;
bool fileChange = group.GetPartInventoryFileName(remoteClient, primLocalID);
if (fileChange) if (XferManager != null)
{ part.Inventory.RequestInventoryFile(remoteClient, XferManager);
if (XferManager != null)
{
group.RequestInventoryFile(remoteClient, primLocalID, XferManager);
}
}
}
else
{
m_log.ErrorFormat(
"[PRIM INVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID);
}
} }
/// <summary> /// <summary>

View File

@ -1093,6 +1093,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName); m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName);
HeartbeatThread.Abort(); HeartbeatThread.Abort();
Watchdog.RemoveThread(HeartbeatThread.ManagedThreadId);
HeartbeatThread = null; HeartbeatThread = null;
} }
m_lastUpdate = Util.EnvironmentTickCount(); m_lastUpdate = Util.EnvironmentTickCount();
@ -4801,7 +4802,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_firstHeartbeat) if (m_firstHeartbeat)
return; return;
if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000) if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 10000)
StartTimer(); StartTimer();
} }

View File

@ -76,49 +76,6 @@ namespace OpenSim.Region.Framework.Scenes
parts[i].Inventory.RemoveScriptInstances(sceneObjectBeingDeleted); parts[i].Inventory.RemoveScriptInstances(sceneObjectBeingDeleted);
} }
/// <summary>
///
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="localID"></param>
public bool GetPartInventoryFileName(IClientAPI remoteClient, uint localID)
{
SceneObjectPart part = GetChildPart(localID);
if (part != null)
{
return part.Inventory.GetInventoryFileName(remoteClient, localID);
}
else
{
m_log.ErrorFormat(
"[PRIM INVENTORY]: " +
"Couldn't find part {0} in object group {1}, {2} to retreive prim inventory",
localID, Name, UUID);
}
return false;
}
/// <summary>
/// Return serialized inventory metadata for the given constituent prim
/// </summary>
/// <param name="localID"></param>
/// <param name="xferManager"></param>
public void RequestInventoryFile(IClientAPI client, uint localID, IXfer xferManager)
{
SceneObjectPart part = GetChildPart(localID);
if (part != null)
{
part.Inventory.RequestInventoryFile(client, xferManager);
}
else
{
m_log.ErrorFormat(
"[PRIM INVENTORY]: " +
"Couldn't find part {0} in object group {1}, {2} to request inventory data",
localID, Name, UUID);
}
}
/// <summary> /// <summary>
/// Add an inventory item to a prim in this group. /// Add an inventory item to a prim in this group.
/// </summary> /// </summary>

View File

@ -46,7 +46,8 @@ namespace OpenSim.Region.Framework.Scenes
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string m_inventoryFileName = String.Empty; private string m_inventoryFileName = String.Empty;
private int m_inventoryFileNameSerial = 0; private byte[] m_inventoryFileData = new byte[0];
private uint m_inventoryFileNameSerial = 0;
private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>(); private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>();
@ -930,39 +931,17 @@ namespace OpenSim.Region.Framework.Scenes
return -1; return -1;
} }
public string GetInventoryFileName() private bool CreateInventoryFileName()
{ {
if (m_inventoryFileName == String.Empty) if (m_inventoryFileName == String.Empty ||
m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp"; m_inventoryFileNameSerial < m_inventorySerial)
if (m_inventoryFileNameSerial < m_inventorySerial)
{ {
m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp"; m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp";
} m_inventoryFileNameSerial = m_inventorySerial;
return m_inventoryFileName;
}
/// <summary>
/// Return the name with which a client can request a xfer of this prim's inventory metadata
/// </summary>
/// <param name="client"></param>
/// <param name="localID"></param>
public bool GetInventoryFileName(IClientAPI client, uint localID)
{
// m_log.DebugFormat(
// "[PRIM INVENTORY]: Received request from client {0} for inventory file name of {1}, {2}",
// client.AgentId, Name, UUID);
if (m_inventorySerial > 0)
{
client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial,
Utils.StringToBytes(GetInventoryFileName()));
return true; return true;
} }
else
{ return false;
client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
return false;
}
} }
/// <summary> /// <summary>
@ -971,78 +950,92 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="xferManager"></param> /// <param name="xferManager"></param>
public void RequestInventoryFile(IClientAPI client, IXfer xferManager) public void RequestInventoryFile(IClientAPI client, IXfer xferManager)
{ {
byte[] fileData = new byte[0]; bool changed = CreateInventoryFileName();
// Confusingly, the folder item has to be the object id, while the 'parent id' has to be zero. This matches
// what appears to happen in the Second Life protocol. If this isn't the case. then various functionality
// isn't available (such as drag from prim inventory to agent inventory)
InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero); InventoryStringBuilder invString = new InventoryStringBuilder(m_part.UUID, UUID.Zero);
Items.LockItemsForRead(true);
if (m_inventorySerial == 0) // No inventory
{
client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
Items.LockItemsForRead(false);
return;
}
client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial,
Util.StringToBytes256(m_inventoryFileName));
if (!changed)
{
if (m_inventoryFileData.Length > 2)
{
xferManager.AddNewFile(m_inventoryFileName,
m_inventoryFileData);
Items.LockItemsForRead(false);
return;
}
}
bool includeAssets = false; bool includeAssets = false;
if (m_part.ParentGroup.Scene.Permissions.CanEditObjectInventory(m_part.UUID, client.AgentId)) if (m_part.ParentGroup.Scene.Permissions.CanEditObjectInventory(m_part.UUID, client.AgentId))
includeAssets = true; includeAssets = true;
lock (m_items) foreach (TaskInventoryItem item in m_items.Values)
{ {
foreach (TaskInventoryItem item in m_items.Values) UUID ownerID = item.OwnerID;
{ uint everyoneMask = 0;
UUID ownerID = item.OwnerID; uint baseMask = item.BasePermissions;
uint everyoneMask = 0; uint ownerMask = item.CurrentPermissions;
uint baseMask = item.BasePermissions; uint groupMask = item.GroupPermissions;
uint ownerMask = item.CurrentPermissions;
uint groupMask = item.GroupPermissions;
invString.AddItemStart(); invString.AddItemStart();
invString.AddNameValueLine("item_id", item.ItemID.ToString()); invString.AddNameValueLine("item_id", item.ItemID.ToString());
invString.AddNameValueLine("parent_id", m_part.UUID.ToString()); invString.AddNameValueLine("parent_id", m_part.UUID.ToString());
invString.AddPermissionsStart(); invString.AddPermissionsStart();
invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask));
invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask));
invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask)); invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask));
invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask));
invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions));
invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
invString.AddNameValueLine("owner_id", ownerID.ToString()); invString.AddNameValueLine("owner_id", ownerID.ToString());
invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString());
invString.AddNameValueLine("group_id", item.GroupID.ToString()); invString.AddNameValueLine("group_id", item.GroupID.ToString());
invString.AddSectionEnd(); invString.AddSectionEnd();
if (includeAssets) if (includeAssets)
invString.AddNameValueLine("asset_id", item.AssetID.ToString()); invString.AddNameValueLine("asset_id", item.AssetID.ToString());
else else
invString.AddNameValueLine("asset_id", UUID.Zero.ToString()); invString.AddNameValueLine("asset_id", UUID.Zero.ToString());
invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
invString.AddSaleStart(); invString.AddSaleStart();
invString.AddNameValueLine("sale_type", "not"); invString.AddNameValueLine("sale_type", "not");
invString.AddNameValueLine("sale_price", "0"); invString.AddNameValueLine("sale_price", "0");
invString.AddSectionEnd(); invString.AddSectionEnd();
invString.AddNameValueLine("name", item.Name + "|"); invString.AddNameValueLine("name", item.Name + "|");
invString.AddNameValueLine("desc", item.Description + "|"); invString.AddNameValueLine("desc", item.Description + "|");
invString.AddNameValueLine("creation_date", item.CreationDate.ToString()); invString.AddNameValueLine("creation_date", item.CreationDate.ToString());
invString.AddSectionEnd(); invString.AddSectionEnd();
}
} }
int count = m_items.Count;
m_items.LockItemsForRead(false);
fileData = Utils.StringToBytes(invString.BuildString); Items.LockItemsForRead(false);
//m_log.Debug(Utils.BytesToString(fileData)); m_inventoryFileData = Utils.StringToBytes(invString.BuildString);
//m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Utils.BytesToString(fileData));
if (fileData.Length > 2) if (m_inventoryFileData.Length > 2)
{ {
xferManager.AddNewFile(m_inventoryFileName, fileData); xferManager.AddNewFile(m_inventoryFileName, m_inventoryFileData);
} }
} }

View File

@ -106,7 +106,7 @@ namespace OpenSim.Region.Framework.Scenes
g.ScheduleFullUpdateToAvatar(m_presence); g.ScheduleFullUpdateToAvatar(m_presence);
} }
while (m_partsUpdateQueue.Count > 0) while (m_partsUpdateQueue.Count != null && m_partsUpdateQueue.Count > 0)
{ {
SceneObjectPart part = m_partsUpdateQueue.Dequeue(); SceneObjectPart part = m_partsUpdateQueue.Dequeue();

View File

@ -1123,6 +1123,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
} }
public void SendAbortXferPacket(ulong xferID)
{
}
public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
{ {

View File

@ -686,6 +686,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data)
{ {
}
public virtual void SendAbortXferPacket(ulong xferID)
{
} }
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,

View File

@ -696,6 +696,11 @@ namespace OpenSim.Tests.Common.Mock
{ {
} }
public virtual void SendAbortXferPacket(ulong xferID)
{
}
public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,