Merge branch 'avination' into ubitwork
commit
39f5fd0f58
|
@ -927,6 +927,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
packetInbox.EnqueueHigh(new IncomingPacket((LLClientView)client, packet));
|
packetInbox.EnqueueHigh(new IncomingPacket((LLClientView)client, packet));
|
||||||
else
|
else
|
||||||
packetInbox.EnqueueLow(new IncomingPacket((LLClientView)client, packet));
|
packetInbox.EnqueueLow(new IncomingPacket((LLClientView)client, packet));
|
||||||
|
// packetInbox.Enqueue(new IncomingPacket((LLClientView)client, packet));
|
||||||
}
|
}
|
||||||
|
|
||||||
#region BinaryStats
|
#region BinaryStats
|
||||||
|
|
|
@ -422,6 +422,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class DescendentsRequestData
|
||||||
|
{
|
||||||
|
public IClientAPI RemoteClient;
|
||||||
|
public UUID FolderID;
|
||||||
|
public UUID OwnerID;
|
||||||
|
public bool FetchFolders;
|
||||||
|
public bool FetchItems;
|
||||||
|
public int SortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Queue<DescendentsRequestData> m_descendentsRequestQueue = new Queue<DescendentsRequestData>();
|
||||||
|
private Object m_descendentsRequestLock = new Object();
|
||||||
|
private bool m_descendentsRequestProcessing = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tell the client about the various child items and folders contained in the requested folder.
|
/// Tell the client about the various child items and folders contained in the requested folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -458,17 +472,38 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We're going to send the reply async, because there may be
|
lock (m_descendentsRequestLock)
|
||||||
// an enormous quantity of packets -- basically the entire inventory!
|
{
|
||||||
// We don't want to block the client thread while all that is happening.
|
if (!m_descendentsRequestProcessing)
|
||||||
SendInventoryDelegate d = SendInventoryAsync;
|
{
|
||||||
d.BeginInvoke(remoteClient, folderID, ownerID, fetchFolders, fetchItems, sortOrder, SendInventoryComplete, d);
|
m_descendentsRequestProcessing = true;
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DescendentsRequestData req = new DescendentsRequestData();
|
||||||
|
req.RemoteClient = remoteClient;
|
||||||
|
req.FolderID = folderID;
|
||||||
|
req.OwnerID = ownerID;
|
||||||
|
req.FetchFolders = fetchFolders;
|
||||||
|
req.FetchItems = fetchItems;
|
||||||
|
req.SortOrder = sortOrder;
|
||||||
|
|
||||||
|
m_descendentsRequestQueue.Enqueue(req);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate void SendInventoryDelegate(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
|
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)
|
void SendInventoryAsync(IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder)
|
||||||
{
|
{
|
||||||
|
Thread.Sleep(20);
|
||||||
SendInventoryUpdate(remoteClient, new InventoryFolderBase(folderID), fetchFolders, fetchItems);
|
SendInventoryUpdate(remoteClient, new InventoryFolderBase(folderID), fetchFolders, fetchItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,6 +511,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
|
SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
|
||||||
d.EndInvoke(iar);
|
d.EndInvoke(iar);
|
||||||
|
|
||||||
|
lock (m_descendentsRequestLock)
|
||||||
|
{
|
||||||
|
if (m_descendentsRequestQueue.Count > 0)
|
||||||
|
{
|
||||||
|
DescendentsRequestData req = m_descendentsRequestQueue.Dequeue();
|
||||||
|
|
||||||
|
d = SendInventoryAsync;
|
||||||
|
d.BeginInvoke(req.RemoteClient, req.FolderID, req.OwnerID, req.FetchFolders, req.FetchItems, req.SortOrder, SendInventoryComplete, d);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_descendentsRequestProcessing = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -5475,7 +5475,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
// for completion and should LSL_Key ever be implemented
|
// for completion and should LSL_Key ever be implemented
|
||||||
// as it's own struct
|
// as it's own struct
|
||||||
else if (!(src.Data[index] is LSL_String ||
|
else if (!(src.Data[index] is LSL_String ||
|
||||||
src.Data[index] is LSL_Key))
|
src.Data[index] is LSL_Key ||
|
||||||
|
src.Data[index] is String))
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -12818,7 +12819,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public void llCollisionSprite(string impact_sprite)
|
public void llCollisionSprite(string impact_sprite)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
NotImplemented("llCollisionSprite");
|
// Viewer 2.0 broke this and it's likely LL has no intention
|
||||||
|
// of fixing it. Therefore, letting this be a NOP seems appropriate.
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llGodLikeRezObject(string inventory, LSL_Vector pos)
|
public void llGodLikeRezObject(string inventory, LSL_Vector pos)
|
||||||
|
|
Loading…
Reference in New Issue