* Make sure ISceneProvider.IPAndPort gets set to a valid IP address
* Send circuit_code in enable_client cap so the existing circuit code is reused for child agent connections

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2487 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2009-03-16 21:38:23 +00:00
parent 20008e6f6b
commit cb4e07b6c1
5 changed files with 11 additions and 12 deletions

View File

@@ -206,15 +206,6 @@ namespace Simian
// Assign a circuit code and track the agent as an unassociated agent (no UDP connection yet)
agent.CircuitCode = scene.UDP.CreateCircuit(agent);
// Get the IP address of the sim (IPAndPort may be storing IPAdress.Any, aka 0.0.0.0)
IPAddress simIP = scene.IPAndPort.Address;
if (simIP == IPAddress.Any)
{
// Get this machine's IP address
IPHostEntry entry = Dns.GetHostEntry(server.HttpUri.DnsSafeHost);
simIP = entry.AddressList.Length > 0 ? entry.AddressList[entry.AddressList.Length - 1] : IPAddress.Loopback;
}
response.AgentID = agent.ID;
response.SecureSessionID = agent.SecureSessionID;
response.SessionID = agent.SessionID;
@@ -240,7 +231,7 @@ namespace Simian
response.SecondsSinceEpoch = DateTime.Now;
response.SeedCapability = agent.SeedCapability.ToString();
response.SimIP = simIP;
response.SimIP = scene.IPAndPort.Address;
response.SimPort = (ushort)scene.IPAndPort.Port;
response.StartLocation = "last"; // FIXME:
response.Success = true;

View File

@@ -1026,6 +1026,7 @@ namespace Simian
UUID agentID = map["agent_id"].AsUUID();
UUID sessionID = map["session_id"].AsUUID();
UUID secureSessionID = map["secure_session_id"].AsUUID();
uint circuitCode = (uint)map["circuit_code"].AsInteger();
// TODO: Send an identity url and token instead so we can pull down all of the information
string firstName = map["first_name"].AsString();
string lastName = map["last_name"].AsString();
@@ -1070,7 +1071,8 @@ namespace Simian
enableClientCompleteCallbacks[agentID] = callbackUri;
// Assign a circuit code and track the agent as an unassociated agent (no UDP connection yet)
agent.CircuitCode = udp.CreateCircuit(agent);
udp.CreateCircuit(agent, circuitCode);
agent.CircuitCode = circuitCode;
osdResponse["success"] = OSD.FromBoolean(true);
}
@@ -1234,6 +1236,7 @@ namespace Simian
map["agent_id"] = OSD.FromUUID(agent.ID);
map["session_id"] = OSD.FromUUID(agent.SessionID);
map["secure_session_id"] = OSD.FromUUID(agent.SecureSessionID);
map["circuit_code"] = OSD.FromInteger((int)agent.CircuitCode);
map["first_name"] = OSD.FromString(agent.Info.FirstName);
map["last_name"] = OSD.FromString(agent.Info.LastName);
map["callback_uri"] = OSD.FromUri(callbackUri);