mirror of
https://github.com/opensim/opensim.git
synced 2026-05-30 22:37:13 +08:00
replace llsd xml fw encoder
This commit is contained in:
@@ -468,12 +468,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
// do nothing, in last case http server will do it
|
||||
}
|
||||
|
||||
private readonly byte[] EventHeader = GenEventHeader();
|
||||
|
||||
private static byte[] GenEventHeader()
|
||||
{
|
||||
return Encoding.UTF8.GetBytes("<llsd><map><key>events</key><array>");
|
||||
}
|
||||
private readonly byte[] EventHeader = osUTF8.GetASCIIBytes("<llsd><map><key>events</key><array>");
|
||||
|
||||
public Hashtable GetEvents(UUID requestID, UUID pAgentId)
|
||||
{
|
||||
@@ -539,11 +534,11 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
totalSize += EventHeader.Length;
|
||||
|
||||
StringBuilder sb = new StringBuilder(1024);
|
||||
LLSDxmlEncode.AddEndArray(sb); // events array
|
||||
LLSDxmlEncode.AddElem("id", thisID, sb);
|
||||
LLSDxmlEncode.AddEndMap(sb);
|
||||
element = LLSDxmlEncode.EndToNBBytes(sb);
|
||||
osUTF8 sb = OSUTF8Cached.Acquire();
|
||||
LLSDxmlEncode2.AddEndArray(sb); // events array
|
||||
LLSDxmlEncode2.AddElem("id", thisID, sb);
|
||||
LLSDxmlEncode2.AddEndMap(sb);
|
||||
element = LLSDxmlEncode2.EndToBytes(sb);
|
||||
elements.Add(element);
|
||||
totalSize += element.Length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user