* Fixed a nasty OSD->JSON bug that was producing invalid JSON for empty arrays or dictionaries
* Several fixes in OpenMetaverse.Http.CapsServer and OpenMetaverse.Http.EventQueueServer (this is the first time they've been tested) [Simian] * Initial capabilities and EventQueue support (appears to be working) * HyperGrid is almost working * More cleanup with how agents are removed from the scene git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2427 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -141,10 +141,16 @@ namespace Simian.Extensions
|
||||
if (responseData.Success)
|
||||
responseData.InventorySkeleton = server.Inventory.CreateInventorySkeleton(responseData.AgentID);
|
||||
|
||||
XmlWriter writer = XmlWriter.Create(response.Body);
|
||||
responseData.ToXmlRpc(writer);
|
||||
writer.Flush();
|
||||
writer.Close();
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
using (XmlWriter writer = XmlWriter.Create(memoryStream))
|
||||
{
|
||||
responseData.ToXmlRpc(writer);
|
||||
writer.Flush();
|
||||
}
|
||||
|
||||
response.ContentLength = memoryStream.Length;
|
||||
response.Body.Write(memoryStream.GetBuffer(), 0, (int)memoryStream.Length);
|
||||
response.Body.Flush();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -178,6 +184,9 @@ namespace Simian.Extensions
|
||||
// Authentication successful, create a login instance of this agent
|
||||
agent = server.Accounts.CreateInstance(agentID);
|
||||
|
||||
// Create a seed capability for this agent
|
||||
Uri seedCap = server.Capabilities.CreateCapability(server.Scene.SeedCapabilityHandler, false, agentID);
|
||||
|
||||
if (agent != null)
|
||||
{
|
||||
// Assign a circuit code and insert the agent into the unassociatedAgents dictionary
|
||||
@@ -217,8 +226,7 @@ namespace Simian.Extensions
|
||||
response.RegionY = regionY;
|
||||
|
||||
response.SecondsSinceEpoch = DateTime.Now;
|
||||
// FIXME: Actually generate a seed capability
|
||||
response.SeedCapability = String.Format("http://{0}:{1}/seed_caps", simIP, server.HttpPort);
|
||||
response.SeedCapability = seedCap.ToString();
|
||||
response.SimIP = simIP;
|
||||
response.SimPort = (ushort)server.UDPPort;
|
||||
response.StartLocation = "last"; // FIXME:
|
||||
|
||||
Reference in New Issue
Block a user